Skip to content

Commit 26325f6

Browse files
authored
Merge pull request #43 from makermelissa/master
Fix bug where if category is out of bounds it was crashing
2 parents 444df22 + beb7638 commit 26325f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

adafruit_ble/services/apple.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ def __str__(self):
165165
category = None
166166
if self.category_id < len(NOTIFICATION_CATEGORIES):
167167
category = NOTIFICATION_CATEGORIES[self.category_id]
168+
else:
169+
category = "Reserved"
168170

169171
if self.silent:
170172
flags.append("silent")

0 commit comments

Comments
 (0)