summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-01 19:56:47 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-04 22:59:39 +0200
commit08bb34e392989ccefa4706ac017449148e8f61fe (patch)
treefefdbb46ac5a62d8ef68d71e52c7ecdfa632af94
parent3a3b3c3ffaea0a6e77f6dbf5ee6a3de121b5b9a9 (diff)
downloadvyos-1x-08bb34e392989ccefa4706ac017449148e8f61fe.tar.gz
vyos-1x-08bb34e392989ccefa4706ac017449148e8f61fe.zip
vxlan: T2241: cleanup verify section
- make error output more user friendly - replace .format with f-strings - split into lines less than ~80 characters long
-rwxr-xr-xsrc/conf_mode/interfaces-vxlan.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-vxlan.py b/src/conf_mode/interfaces-vxlan.py
index 8abd2b46e..fabfaa9df 100755
--- a/src/conf_mode/interfaces-vxlan.py
+++ b/src/conf_mode/interfaces-vxlan.py
@@ -165,9 +165,9 @@ def get_config():
def verify(vxlan):
if vxlan['deleted']:
if vxlan['is_bridge_member']:
- interface = vxlan['intf']
- bridge = vxlan['is_bridge_member']
- raise ConfigError(f'Interface "{interface}" can not be deleted as it belongs to bridge "{bridge}"!')
+ raise ConfigError((
+ f'Cannot delete interface "{vxlan["intf"]}" as it is a '
+ f'member of bridge "{vxlan["is_bridge_member"]}"!')
return None