diff options
-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 |