Skip to content

Commit 86b8f8c

Browse files
committed
Handle non-dict payloads
1 parent ecfcc0a commit 86b8f8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def on_message(self, message):
106106

107107
def send(self, protocol, command, payload):
108108
"""Send a message to UI/client"""
109-
if 'secret' in payload:
109+
if isinstance(payload, dict) and 'secret' in payload:
110110
del payload['secret']
111111
m = json.dumps({'protocol': protocol, 'command': command, 'payload': payload})
112112
self.ws.send(m)

0 commit comments

Comments
 (0)