summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-01 20:04:28 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-04 22:59:40 +0200
commitab478417b027ca650563552c11af97742930a451 (patch)
treeecdbe67ea82c2cbfcd1ee6a7952bd4d016eef54d /src
parent0e369db49f7b51c175a458dbc32215fbed4ad5a0 (diff)
downloadvyos-1x-ab478417b027ca650563552c11af97742930a451.tar.gz
vyos-1x-ab478417b027ca650563552c11af97742930a451.zip
wireless: T2241: cleanup verify section
- make error output more user friendly - replace .format with f-strings - split into lines less than ~80 characters long
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-wireless.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-wireless.py b/src/conf_mode/interfaces-wireless.py
index 962238273..4d61dc303 100755
--- a/src/conf_mode/interfaces-wireless.py
+++ b/src/conf_mode/interfaces-wireless.py
@@ -552,9 +552,9 @@ def get_config():
def verify(wifi):
if wifi['deleted']:
if wifi['is_bridge_member']:
- interface = wifi['intf']
- bridge = wifi['is_bridge_member']
- raise ConfigError(f'Interface "{interface}" can not be deleted as it belongs to bridge "{bridge}"!')
+ raise ConfigError((
+ f'Cannot delete interface "{wifi["intf"]}" as it is a '
+ f'member of bridge "{wifi["is_bridge_member"]}"!'))
return None