diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-01 20:08:06 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-04 22:59:40 +0200 |
commit | 6c8c129c78d084dd3e3b4dfeb7e7aa1b386370b8 (patch) | |
tree | 92f59c4f1022d325434e781bba758b0984973834 /src | |
parent | bca5864a1b1182b9c2b2949cddfb715f51535ffb (diff) | |
download | vyos-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')
-rwxr-xr-x | src/conf_mode/interfaces-wirelessmodem.py | 6 |
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 |