mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
additional exception handling
* catches TypeError when trying to load json data
This commit is contained in:
parent
d2094cd611
commit
e8a00377ae
1 changed files with 1 additions and 1 deletions
|
@ -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()':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue