diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-10-27 23:12:10 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-10-27 23:57:10 +0100 |
commit | ed642ff5e958c6ef43dee5ef684fb5ccf85ad8cf (patch) | |
tree | 18e8c41bfa8e9ef2751adc7bbba73dd33ee2ee35 /src/conf_mode | |
parent | b86f1d702e3b67774d3a2eec1f9fa83108711798 (diff) | |
download | vyos-1x-ed642ff5e958c6ef43dee5ef684fb5ccf85ad8cf.tar.gz vyos-1x-ed642ff5e958c6ef43dee5ef684fb5ccf85ad8cf.zip |
snmp: fix verify() bail out early order
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/snmp.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py index 5a0c679c5..f2cc8bf17 100755 --- a/src/conf_mode/snmp.py +++ b/src/conf_mode/snmp.py @@ -549,10 +549,6 @@ def verify(snmp): else: os.chmod(snmp['script_ext'][ext], 0o555) - # bail out early if SNMP v3 is not configured - if not snmp['v3_enabled']: - return None - for listen in snmp['listen_address']: addr = listen[0] port = listen[1] @@ -571,6 +567,10 @@ def verify(snmp): else: print('WARNING: SNMP listen address {0} not configured!'.format(addr)) + # bail out early if SNMP v3 is not configured + if not snmp['v3_enabled']: + return None + if 'v3_groups' in snmp.keys(): for group in snmp['v3_groups']: # |