Skip to content

Commit

Permalink
Merge pull request jziolkowski#128 from barbudor/fix_status_not_status
Browse files Browse the repository at this point in the history
Prevent crash on STATUS without Status key
  • Loading branch information
jziolkowski authored Mar 6, 2021
2 parents 34ef367 + bcbb4e5 commit cddde1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def parse_message(self, topic, msg):
logging.critical("PARSER: Can't parse STATUS (%s)", e)

if payload:
payload = payload['Status']
payload = payload.get('Status', {})
for k, v in payload.items():
if k == "FriendlyName":
for fnk, fnv in enumerate(v, start=1):
Expand Down

0 comments on commit cddde1f

Please sign in to comment.