mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Fix incorrect use of is for comparisons.
See https://bugs.python.org/issue34850 for details.
This commit is contained in:
@@ -384,7 +384,7 @@ class Migrations:
|
||||
cluster_keys[cluster_key] = 1
|
||||
else:
|
||||
cluster_keys[cluster_key] += 1
|
||||
if len(cluster_keys.keys()) is 1 and \
|
||||
if len(cluster_keys.keys()) == 1 and \
|
||||
self._start_cluster_key in cluster_keys:
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -85,7 +85,7 @@ def typedvalue(value):
|
||||
def getvariable(cursor, mysqlvar):
|
||||
cursor.execute("SHOW VARIABLES WHERE Variable_name = %s", (mysqlvar,))
|
||||
mysqlvar_val = cursor.fetchall()
|
||||
if len(mysqlvar_val) is 1:
|
||||
if len(mysqlvar_val) == 1:
|
||||
return mysqlvar_val[0][1]
|
||||
else:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user