summaryrefslogtreecommitdiffstats
path: root/gromka/keyboard.py
diff options
context:
space:
mode:
Diffstat (limited to 'gromka/keyboard.py')
-rwxr-xr-xgromka/keyboard.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gromka/keyboard.py b/gromka/keyboard.py
index 14276cc..4873636 100755
--- a/gromka/keyboard.py
+++ b/gromka/keyboard.py
@@ -38,7 +38,10 @@ for key in show.find_all("Input"):
if key.has_attr("Universe") and key["Universe"] == "0" and key.has_attr("Channel") and int(key["Channel"]) >= 198 and int(key["Channel"]) <= 198 + 24:
if midi[int(key["Channel"]) - 198] != "":
midi[int(key["Channel"]) - 198] += ", "
- midi[int(key["Channel"]) - 198] += key.parent["Caption"] + " (" + key.parent.name + ")"
+ caption = ""
+ if key.parent.has_attr("Caption"):
+ caption = key.parent["Caption"]
+ midi[int(key["Channel"]) - 198] += caption + " (" + key.parent.name + ")"
for key in range(0, 24):
kje = " zgoraj"