diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-01 18:53:27 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-04 22:59:39 +0200 |
commit | 141d45d39d83fbd1eab025bcd00dabcadd6f4e61 (patch) | |
tree | 494e044b747eb22cc3d16a21037b0e2b26660a34 /src/conf_mode/interfaces-l2tpv3.py | |
parent | ea6fd38d526f95a4e8524dfb3fc3ccc4460276e0 (diff) | |
download | vyos-1x-141d45d39d83fbd1eab025bcd00dabcadd6f4e61.tar.gz vyos-1x-141d45d39d83fbd1eab025bcd00dabcadd6f4e61.zip |
l2tpv3: 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/interfaces-l2tpv3.py')
-rwxr-xr-x | src/conf_mode/interfaces-l2tpv3.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces-l2tpv3.py b/src/conf_mode/interfaces-l2tpv3.py index fe5de3431..26bb537e5 100755 --- a/src/conf_mode/interfaces-l2tpv3.py +++ b/src/conf_mode/interfaces-l2tpv3.py @@ -168,9 +168,9 @@ def verify(l2tpv3): if l2tpv3['deleted']: if l2tpv3['is_bridge_member']: - interface = l2tpv3['intf'] - bridge = l2tpv3['is_bridge_member'] - raise ConfigError(f'Interface "{interface}" can not be deleted as it belongs to bridge "{bridge}"!') + raise ConfigError(( + f'Interface "{l2tpv3["intf"]}" cannot be deleted as it is a ' + f'member of bridge "{l2tpv3["is_bridge_member"]}"!')) return None |