mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 00:03:10 +00:00
additional exception handling
* catches TypeError when trying to load json data
This commit is contained in:
@@ -229,7 +229,7 @@ class Connection(_Connection):
|
||||
"""
|
||||
try:
|
||||
obj = json.loads(cmd)
|
||||
except ValueError:
|
||||
except (ValueError, TypeError):
|
||||
obj = {'command': str(cmd).strip()}
|
||||
|
||||
if obj['command'] == 'close_shell()':
|
||||
|
||||
Reference in New Issue
Block a user