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

Fixed Watch.unmarshal_event when data is not a JSON-serialized object #171

Merged
merged 1 commit into from
Feb 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions watch/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def unmarshal_event(self, data, return_type):
js = json.loads(data)
except ValueError:
return data
if not (isinstance(js, dict) and 'object' in js):
return data
js['raw_object'] = js['object']
if return_type:
obj = SimpleNamespace(data=json.dumps(js['raw_object']))
Expand Down