summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-08-07 13:41:24 +0200
committerChristian Breunig <christian@breunig.cc>2023-08-07 13:41:29 +0200
commit5474a82034a0354c0e5878fd6690d0861435e992 (patch)
treeedb2b768e1f9e2aacb413b2bf8881b3b43f4c0f8 /src
parenta7898fdc0da81539a6b7ed5bdf8f32750b3db33e (diff)
downloadvyos-1x-5474a82034a0354c0e5878fd6690d0861435e992.tar.gz
vyos-1x-5474a82034a0354c0e5878fd6690d0861435e992.zip
vyos.configdict(): T4228: fix bonding error message interface name
This fixes the error message: Can not add interface "eth1" to bond, it is already a member of bridge "{'br6327': {}}"! As the dict should be moved to a string (br6327)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-bonding.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-bonding.py b/src/conf_mode/interfaces-bonding.py
index b3b4e6342..0bd306ed0 100755
--- a/src/conf_mode/interfaces-bonding.py
+++ b/src/conf_mode/interfaces-bonding.py
@@ -195,11 +195,11 @@ def verify(bond):
raise ConfigError(error_msg + 'it does not exist!')
if 'is_bridge_member' in interface_config:
- tmp = interface_config['is_bridge_member']
+ tmp = next(iter(interface_config['is_bridge_member']))
raise ConfigError(error_msg + f'it is already a member of bridge "{tmp}"!')
if 'is_bond_member' in interface_config:
- tmp = interface_config['is_bond_member']
+ tmp = next(iter(interface_config['is_bond_member']))
raise ConfigError(error_msg + f'it is already a member of bond "{tmp}"!')
if 'is_source_interface' in interface_config: