summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorNathaniel Case <this.is@nathanielca.se>2017-11-15 21:40:32 +0100
committerGitHub <noreply@github.com>2017-11-15 21:40:32 +0100
commit21c8ab537bf96893d0f6bff42efb754efb7083a7 (patch)
treed36cf220a0e9d5578b0bdd7e633f6cc94f3791bc /bin
parentsl_vm: PEP8 compliancy and documentation changes (#32657) (diff)
downloadansible-21c8ab537bf96893d0f6bff42efb754efb7083a7.tar.xz
ansible-21c8ab537bf96893d0f6bff42efb754efb7083a7.zip
getattr() with no default is an AttributeError if missing (#32946)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ansible-connection2
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({