diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2020-09-12 23:56:29 +0200 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2020-09-12 23:56:29 +0200 |
commit | 6157c88b1e7e47dfa9233776aa25b716e62f8af2 (patch) | |
tree | 8fd36232330c02128a6454a52b155917c2e6263d /swiftstory | |
parent | 306d7fbfd145b3f147611bdcf651530bfb4d808f (diff) |
Handle JSON with no opcode
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'swiftstory')
-rw-r--r-- | swiftstory/SwiftStory.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/swiftstory/SwiftStory.py b/swiftstory/SwiftStory.py index de2a085..770e347 100644 --- a/swiftstory/SwiftStory.py +++ b/swiftstory/SwiftStory.py @@ -20,7 +20,7 @@ def message_received_handler(client, message): except json.JSONDecodeError: return error('badly formatted json') - op = json_msg['op'] + op = json_msg.get('op') if op == 'join_game': try: game_name = json_msg['game_name'] |