mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
getattr() with no default is an AttributeError if missing (#32946)
This commit is contained in:
parent
3089892e59
commit
21c8ab537b
1 changed files with 1 additions and 1 deletions
|
@ -299,7 +299,7 @@ def main():
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
# Only network_cli has update_play context, so missing this is
|
# Only network_cli has update_play context, so missing this is
|
||||||
# not fatal e.g. netconf
|
# 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
|
pass
|
||||||
else:
|
else:
|
||||||
result.update({
|
result.update({
|
||||||
|
|
Loading…
Reference in a new issue