Skip to content

Commit

Permalink
getattr() with no default is an AttributeError if missing (ansible#32946
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Qalthos authored Nov 15, 2017
1 parent 3089892 commit 21c8ab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/ansible-connection
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 21c8ab5

Please sign in to comment.