diff --git a/lib/ansible/module_utils/netcli.py b/lib/ansible/module_utils/netcli.py index 1e9ef00779..33b6d2d92b 100644 --- a/lib/ansible/module_utils/netcli.py +++ b/lib/ansible/module_utils/netcli.py @@ -228,7 +228,7 @@ class Conditional(object): if self.encoding in ['json', 'text']: try: return self.get_json(result) - except (IndexError, TypeError): + except (IndexError, TypeError, AttributeError): msg = 'unable to apply conditional to result' raise FailedConditionalError(msg, self.raw)