diff options
author | Nathaniel Case <this.is@nathanielca.se> | 2017-11-15 21:40:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-15 21:40:32 +0100 |
commit | 21c8ab537bf96893d0f6bff42efb754efb7083a7 (patch) | |
tree | d36cf220a0e9d5578b0bdd7e633f6cc94f3791bc /bin | |
parent | sl_vm: PEP8 compliancy and documentation changes (#32657) (diff) | |
download | ansible-21c8ab537bf96893d0f6bff42efb754efb7083a7.tar.xz ansible-21c8ab537bf96893d0f6bff42efb754efb7083a7.zip |
getattr() with no default is an AttributeError if missing (#32946)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ansible-connection | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ansible-connection b/bin/ansible-connection index eed348f431..ced24ee47b 100755 --- a/bin/ansible-connection +++ b/bin/ansible-connection @@ -299,7 +299,7 @@ def main(): except Exception as exc: # Only network_cli has update_play context, so missing this is # not fatal e.g. netconf - if isinstance(exc, ConnectionError) and getattr(exc, 'code') == -32601: + if isinstance(exc, ConnectionError) and getattr(exc, 'code', None) == -32601: pass else: result.update({ |