diff options
| author | Yuval Adam <_@yuv.al> | 2022-02-18 12:18:49 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2022-02-18 12:18:49 +0200 |
| commit | 291a685f87133608dc39fd960f103193b779ec75 (patch) | |
| tree | b5f0de09289c80ed847c5c81b53cf2f48ede51c7 | |
| parent | dcbe30d9d38430482b51bdd59d12c7d871856f13 (diff) | |
Support some weird binary content that returns on routine
| -rw-r--r-- | alarmpy/alarmpy.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/alarmpy/alarmpy.py b/alarmpy/alarmpy.py index c15619b..5d20b29 100644 --- a/alarmpy/alarmpy.py +++ b/alarmpy/alarmpy.py @@ -125,6 +125,10 @@ class Alarm: # empty content means no alarms return [], None + if res.content == b"\xef\xbb\xbf\r\n": + # some weird binary content that also means no alarms + return [], None + data = {} # To avoid warning in KeyError try: data = res.json() |
