Fix mysql driver comparison operator
A test was failing due to L67 in tooz/drivers/mysql.py using `is` instead of `==`. Change-Id: I2baa101499f170ece99ccff368103b58f31ca79a Closes-Bug: 1875749
This commit is contained in:
parent
1880be2c00
commit
2546cfc562
|
@ -64,7 +64,7 @@ class MySQLLock(locking.Lock):
|
|||
with self._conn as cur:
|
||||
cur.execute("SELECT GET_LOCK(%s, 0);", self.name)
|
||||
# Can return NULL on error
|
||||
if cur.fetchone()[0] is 1:
|
||||
if cur.fetchone()[0] == 1:
|
||||
self.acquired = True
|
||||
return True
|
||||
except pymysql.MySQLError as e:
|
||||
|
|
Loading…
Reference in New Issue