diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-01 20:04:28 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-04 22:59:40 +0200 |
commit | ab478417b027ca650563552c11af97742930a451 (patch) | |
tree | ecdbe67ea82c2cbfcd1ee6a7952bd4d016eef54d /src | |
parent | 0e369db49f7b51c175a458dbc32215fbed4ad5a0 (diff) | |
download | vyos-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-x | src/conf_mode/interfaces-wireless.py | 6 |
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 |