summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-02-17 21:10:16 +0100
committerChristian Poessinger <christian@poessinger.com>2022-02-17 21:13:48 +0100
commite9717236fb232f58c9d3fcb2d19b3f5c5d916ae2 (patch)
tree97823ac08c79b593bcc40e7297d0f1b8f00f1436
parent1e60e4a29688112256a30c188512e11a9df91af1 (diff)
downloadvyos-1x-e9717236fb232f58c9d3fcb2d19b3f5c5d916ae2.tar.gz
vyos-1x-e9717236fb232f58c9d3fcb2d19b3f5c5d916ae2.zip
vyos.configverify: T4255: fix unexpected print of dictionary instead of key
(cherry picked from commit 9e626ce7bad2bd846826822a3622fedf2d937e09)
-rw-r--r--python/vyos/configverify.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index 3aece499e..6566e8863 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -196,9 +196,10 @@ def verify_bridge_delete(config):
when interface also is part of a bridge.
"""
if 'is_bridge_member' in config:
- raise ConfigError(
- 'Interface "{ifname}" cannot be deleted as it is a '
- 'member of bridge "{is_bridge_member}"!'.format(**config))
+ interface = config['ifname']
+ for bridge in config['is_bridge_member']:
+ raise ConfigError(f'Interface "{interface}" cannot be deleted as it '
+ f'is a member of bridge "{bridge}"!')
def verify_interface_exists(ifname):
"""