Fix incorrect use of is for comparisons.

See https://bugs.python.org/issue34850 for details.
This commit is contained in:
Matt Clay 2019-02-12 15:15:23 -08:00
parent cd7a144515
commit 0a461380a3
21 changed files with 42 additions and 42 deletions

View file

@ -259,7 +259,7 @@ def parse_name(line, dest):
def parse_level(line, dest):
level = None
if dest is not 'host':
if dest != 'host':
# Line for buffer logging entry in running-config is of the form:
# logging buffered <size> <level>

View file

@ -237,7 +237,7 @@ def get_services(device, dev_group, svc_list, obj_list):
def port_in_svc(orientation, port, protocol, obj):
# Process address objects
if orientation is 'source':
if orientation == 'source':
for x in obj.source_port.split(','):
if '-' in x:
port_range = x.split('-')
@ -248,7 +248,7 @@ def port_in_svc(orientation, port, protocol, obj):
else:
if port == x and obj.protocol == protocol:
return True
elif orientation is 'destination':
elif orientation == 'destination':
for x in obj.destination_port.split(','):
if '-' in x:
port_range = x.split('-')