diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-11-27 13:05:52 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-11-27 13:05:52 +0100 |
commit | a6f9486208aba2008cb342090edb250856347ddd (patch) | |
tree | 601e79548c6d03e1ab821313ce6e44036f218f44 /prolog | |
parent | c325eca1f275c5d3ad5248e2965122b7e26a5e2c (diff) |
Fix: response on /pengine/destroy_all is just "ok"
Diffstat (limited to 'prolog')
-rw-r--r-- | prolog/engine.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/prolog/engine.py b/prolog/engine.py index 94ce14a..bd1fb1d 100644 --- a/prolog/engine.py +++ b/prolog/engine.py @@ -59,7 +59,7 @@ def request(method, path, body=None, timeout=10): raise Exception('server returned {}'.format(response.status)) reply = json.loads(response.read().decode('utf-8')) - if reply.get('event') == 'output': + if isinstance(reply, dict) and reply.get('event') == 'output': messages.append(_get_message(reply)) # Pull the next output. These requests should return instantly |