Skip to content

Commit

Permalink
Protect getattr.
Browse files Browse the repository at this point in the history
  • Loading branch information
jclarke-csco committed Oct 30, 2023
1 parent 071a213 commit 098229e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions virl/cli/views/nodes/node_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ def node_list_table(nodes, computes):
"sync_l3_addresses_if_outdated",
"sync_topology_if_outdated",
):
meth = getattr(node.lab, sync)
if meth:
try:
meth = getattr(node.lab, sync)
except AttributeError:
pass
else:
meth()

node.lab.auto_sync = False
Expand Down

0 comments on commit 098229e

Please sign in to comment.