2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 11:30:23 +00:00

Tolerate empty string to be blank snmp user

For SNMP password without user, accept '' as a synonym for None
This commit is contained in:
Jarrod Johnson 2018-01-16 13:14:13 -05:00
parent 8226c2bd77
commit 0f4940cd7c

View File

@ -34,6 +34,8 @@ def get_switchcreds(configmanager, switches):
'public')
user = switchparms.get(
'secret.hardwaremanagementuser', {}).get('value', None)
if not user:
user = None
switchauth.append((switch, password, user))
return switchauth