ce_snmp_target_host: update to fix bug: None has no 'lower()' function. (#57904)

* update to fix bug: None has not 'lower()' function.

* add a changelog fragment.

* update changlog fragment.

* Update 57904-ce_snmp_target_host.yml
pull/58373/head
YuandongXu 5 years ago committed by René Moser
parent 8cfd0ba039
commit 78c8ee9261

@ -0,0 +1,3 @@
---
bugfixes:
- ce_snmp_target_host - None has no 'lower()' attribute.

@ -493,7 +493,10 @@ class SnmpTargetHost(object):
same_flag = False
if "interface-name" in tmp.keys():
if tmp["interface-name"].lower() != self.interface_name.lower():
if tmp.get("interface-name") is not None:
if tmp["interface-name"].lower() != self.interface_name.lower():
same_flag = False
else:
same_flag = False
if same_flag:

Loading…
Cancel
Save