Merge pull request #171 from Ark-kun/patch-1
Fixed Watch.unmarshal_event when data is not a JSON-serialized object
This commit is contained in:
commit
7e7976b9ff
@ -88,6 +88,8 @@ class Watch(object):
|
||||
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']))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user