Skip to content

Commit 9409b8a

Browse files
committed
fix for unknown status bytes
1 parent 3cfca1d commit 9409b8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tmidi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def __repr__(self):
216216
# pylint: disable=consider-using-f-string
217217
def __str__(self):
218218
mtype = self.type
219-
type_str = "Message(" + _MSG_TYPE_NAMES[mtype]
219+
type_str = "Message(" + _MSG_TYPE_NAMES.get(mtype, "Unknown")
220220
ch_str = "ch:%d" % self.channel if _is_channel_message(mtype) else "-"
221221
if mtype == PITCH_BEND:
222222
return "%s %s %d)" % (type_str, ch_str, self.pitch_bend)

0 commit comments

Comments
 (0)