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

@ -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