summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-05 21:30:12 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-05 21:30:21 +0100
commit5adba572ef53f59d0548e914f15a0eb91ab0ac15 (patch)
tree1bf78ca60cb5dd8b830209bf827920a2d5f2fb18 /src
parentc6fabb49cd4e6e4e6e7505ce66d9daec8cc79d3c (diff)
downloadvyos-1x-5adba572ef53f59d0548e914f15a0eb91ab0ac15.tar.gz
vyos-1x-5adba572ef53f59d0548e914f15a0eb91ab0ac15.zip
radius: T1990: raise ConfigError in os exception handler
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/system-login-radius.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/conf_mode/system-login-radius.py b/src/conf_mode/system-login-radius.py
index 52010b6ea..8f19bae65 100755
--- a/src/conf_mode/system-login-radius.py
+++ b/src/conf_mode/system-login-radius.py
@@ -133,8 +133,10 @@ def apply(radius):
/etc/nsswitch.conf"
os.system(cmd)
- except:
- print('RADIUS configuration failed')
+
+ except Exception as e:
+ raise ConfigError('RADIUS configuration failed: {}'.format(e))
+
else:
try:
# Disable RADIUS in PAM
@@ -147,8 +149,9 @@ def apply(radius):
/etc/nsswitch.conf"
os.system(cmd)
- except:
- print('Removing RADIUS configuration failed')
+
+ except Exception as e:
+ raise ConfigError('Removing RADIUS configuration failed'.format(e))
return None