additional exception handling

* catches TypeError when trying to load json data
pull/20104/merge
Peter Sprygada 8 years ago
parent d2094cd611
commit e8a00377ae

@ -229,7 +229,7 @@ class Connection(_Connection):
""" """
try: try:
obj = json.loads(cmd) obj = json.loads(cmd)
except ValueError: except (ValueError, TypeError):
obj = {'command': str(cmd).strip()} obj = {'command': str(cmd).strip()}
if obj['command'] == 'close_shell()': if obj['command'] == 'close_shell()':

Loading…
Cancel
Save