summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-01 20:08:06 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-04 22:59:40 +0200
commit6c8c129c78d084dd3e3b4dfeb7e7aa1b386370b8 (patch)
tree92f59c4f1022d325434e781bba758b0984973834 /src/conf_mode
parentbca5864a1b1182b9c2b2949cddfb715f51535ffb (diff)
downloadvyos-1x-6c8c129c78d084dd3e3b4dfeb7e7aa1b386370b8.tar.gz
vyos-1x-6c8c129c78d084dd3e3b4dfeb7e7aa1b386370b8.zip
wirelessmodem: 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/conf_mode')
-rwxr-xr-xsrc/conf_mode/interfaces-wirelessmodem.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-wirelessmodem.py b/src/conf_mode/interfaces-wirelessmodem.py
index cf2945593..975e21d9f 100755
--- a/src/conf_mode/interfaces-wirelessmodem.py
+++ b/src/conf_mode/interfaces-wirelessmodem.py
@@ -121,9 +121,9 @@ def get_config():
def verify(wwan):
if wwan['deleted']:
if wwan['is_bridge_member']:
- interface = wwan['intf']
- bridge = wwan['is_bridge_member']
- raise ConfigError(f'Interface "{interface}" can not be deleted as it belongs to bridge "{bridge}"!')
+ raise ConfigError((
+ f'Cannot delete interface "{wwan["intf"]}" as it is a '
+ f'member of bridge "{wwan["is_bridge_member"]}"!'))
return None