mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Change "if cur == False" to "if not cur", as per PEP8
This commit is contained in:
parent
6cc3390538
commit
c42fbc6cc0
@ -52,7 +52,7 @@ def modify(db=None, sql=None):
|
|||||||
'''
|
'''
|
||||||
cur = _connect(db)
|
cur = _connect(db)
|
||||||
|
|
||||||
if cur == False:
|
if not cur:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
cur.execute(sql)
|
cur.execute(sql)
|
||||||
@ -68,7 +68,7 @@ def fetch(db=None, sql=None):
|
|||||||
'''
|
'''
|
||||||
cur = _connect(db)
|
cur = _connect(db)
|
||||||
|
|
||||||
if cur == False:
|
if not cur:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
cur.execute(sql)
|
cur.execute(sql)
|
||||||
@ -85,7 +85,7 @@ def tables(db=None):
|
|||||||
'''
|
'''
|
||||||
cur = _connect(db)
|
cur = _connect(db)
|
||||||
|
|
||||||
if cur == False:
|
if not cur:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
cur.execute("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;")
|
cur.execute("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;")
|
||||||
@ -102,7 +102,7 @@ def indices(db=None):
|
|||||||
'''
|
'''
|
||||||
cur = _connect(db)
|
cur = _connect(db)
|
||||||
|
|
||||||
if cur == False:
|
if not cur:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
cur.execute("SELECT name FROM sqlite_master WHERE type='index' ORDER BY name;")
|
cur.execute("SELECT name FROM sqlite_master WHERE type='index' ORDER BY name;")
|
||||||
|
Loading…
Reference in New Issue
Block a user