diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-01 18:04:11 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-04 22:59:39 +0200 |
commit | c6914e2595172a24d376c0b65c6a2c520a2aaf80 (patch) | |
tree | d6939aaf7357a6cce55dc8293111ede3914058b1 /src | |
parent | ea7ba8a636189bb8e2d87f0de995484be55a016e (diff) | |
download | vyos-1x-c6914e2595172a24d376c0b65c6a2c520a2aaf80.tar.gz vyos-1x-c6914e2595172a24d376c0b65c6a2c520a2aaf80.zip |
dummy: 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-dummy.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-dummy.py b/src/conf_mode/interfaces-dummy.py index 0049442cd..4a77b0c1a 100755 --- a/src/conf_mode/interfaces-dummy.py +++ b/src/conf_mode/interfaces-dummy.py @@ -85,9 +85,9 @@ def get_config(): def verify(dummy): if dummy['deleted']: if dummy['is_bridge_member']: - interface = dummy['intf'] - bridge = dummy['is_bridge_member'] - raise ConfigError(f'Interface "{interface}" can not be deleted as it belongs to bridge "{bridge}"!') + raise ConfigError(( + f'Interface "{dummy["intf"]}" cannot be deleted as it is a ' + f'member of bridge "{dummy["is_bridge_member"]}"!')) return None |