mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-22 16:20:22 -07:00
Fix incorrect use of is
for comparisons.
See https://bugs.python.org/issue34850 for details.
This commit is contained in:
parent
cd7a144515
commit
0a461380a3
21 changed files with 42 additions and 42 deletions
|
@ -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>
|
||||
|
|
|
@ -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('-')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue