lint: fix singleton-comparison

This commit is contained in:
Pim van Pelt
2024-04-07 15:32:28 +02:00
parent 6212c5a82f
commit 09bdaa3fca
2 changed files with 2 additions and 2 deletions

View File

@ -791,7 +791,7 @@ def is_mpls(yaml, ifname):
"""Returns True if the interface exists and has mpls enabled. Returns false otherwise.""" """Returns True if the interface exists and has mpls enabled. Returns false otherwise."""
ifname, iface = get_by_name(yaml, ifname) ifname, iface = get_by_name(yaml, ifname)
try: try:
if iface["mpls"] == True: if iface["mpls"]:
return True return True
except: except:
pass pass

View File

@ -154,7 +154,7 @@ def is_mpls(yaml, ifname):
"""Returns True if the loopback exists and has mpls enabled. Returns false otherwise.""" """Returns True if the loopback exists and has mpls enabled. Returns false otherwise."""
ifname, iface = get_by_name(yaml, ifname) ifname, iface = get_by_name(yaml, ifname)
try: try:
if iface["mpls"] == True: if iface["mpls"]:
return True return True
except: except:
pass pass