From beb76385b22831fe046a0b2fdab5b4b6dbd637d3 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 10 Dec 2019 19:17:23 -0800 Subject: [PATCH] Fix bug where if category is out of bounds it was crashing --- adafruit_ble/services/apple.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adafruit_ble/services/apple.py b/adafruit_ble/services/apple.py index cfa1bb1..115192e 100755 --- a/adafruit_ble/services/apple.py +++ b/adafruit_ble/services/apple.py @@ -165,6 +165,8 @@ def __str__(self): category = None if self.category_id < len(NOTIFICATION_CATEGORIES): category = NOTIFICATION_CATEGORIES[self.category_id] + else: + category = "Reserved" if self.silent: flags.append("silent")