summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-01 18:19:29 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-04 22:59:39 +0200
commit65d4d4c669650ccf727541306330a43da7dceb6f (patch)
tree3cd7cb9ea9218a217d6e4c9958bdbf69fdfdac95
parent9979a6ef4f45ffc6f3686e6c63e50818ea32b610 (diff)
downloadvyos-1x-65d4d4c669650ccf727541306330a43da7dceb6f.tar.gz
vyos-1x-65d4d4c669650ccf727541306330a43da7dceb6f.zip
geneve: 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-geneve.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-geneve.py b/src/conf_mode/interfaces-geneve.py
index 11d6cc2f1..e4109a221 100755
--- a/src/conf_mode/interfaces-geneve.py
+++ b/src/conf_mode/interfaces-geneve.py
@@ -98,9 +98,9 @@ def get_config():
def verify(geneve):
if geneve['deleted']:
if geneve['is_bridge_member']:
- interface = geneve['intf']
- bridge = geneve['is_bridge_member']
- raise ConfigError(f'Interface "{interface}" can not be deleted as it belongs to bridge "{bridge}"!')
+ raise ConfigError((
+ f'Cannot delete interface "{geneve["intf"]}" as it is a '
+ f'member of bridge "{geneve["is_bridge_member"]}"!'))
return None