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:
|
||||
# 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({
|
||||
|
|
Loading…
Reference in a new issue