Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Commit 7e7976b

Browse files
authored
Merge pull request #171 from Ark-kun/patch-1
Fixed Watch.unmarshal_event when data is not a JSON-serialized object
2 parents ff9a5f3 + f11587d commit 7e7976b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

watch/watch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ def unmarshal_event(self, data, return_type):
8888
js = json.loads(data)
8989
except ValueError:
9090
return data
91+
if not (isinstance(js, dict) and 'object' in js):
92+
return data
9193
js['raw_object'] = js['object']
9294
if return_type:
9395
obj = SimpleNamespace(data=json.dumps(js['raw_object']))

0 commit comments

Comments
 (0)