Skip to content

Commit

Permalink
Fixed Watch.unmarshal_event when data is not a JSON-serialized object
Browse files Browse the repository at this point in the history
  • Loading branch information
dudleyhunt86 committed Oct 18, 2019
1 parent cffb573 commit 8555e08
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit 8555e08

Please sign in to comment.