From e8a00377ae865eda782d9a50fc6b6fbc01ef520f Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Thu, 26 Jan 2017 20:39:47 -0500 Subject: [PATCH] additional exception handling * catches TypeError when trying to load json data --- lib/ansible/plugins/connection/network_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()':