diff --git a/lib/ansible/plugins/connection/network_cli.py b/lib/ansible/plugins/connection/network_cli.py index 0371676ab0a..d74c77eb0c4 100644 --- a/lib/ansible/plugins/connection/network_cli.py +++ b/lib/ansible/plugins/connection/network_cli.py @@ -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()':