Skip to content

Commit

Permalink
Controller/Machine.py: handle exceptions when accessing peer_name att…
Browse files Browse the repository at this point in the history
…ribute

Signed-off-by: Jan Tluka <[email protected]>
  • Loading branch information
jtluka committed May 9, 2024
1 parent 1e45557 commit 52bbb5d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lnst/Controller/Machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ def remote_device_set_netns(self, dev, dst, src):
dev_args = dev._dev_args
dev_kwargs = dev._dev_kwargs

if dev.peer_name:
dev_kwargs['peer_name'] = dev.peer_name
try:
if dev.peer_name:
dev_kwargs['peer_name'] = dev.peer_name
except AttributeError:
pass

self.rpc_call("remap_device",
dev.ifindex,
Expand Down

0 comments on commit 52bbb5d

Please sign in to comment.