Fix prevent call close on cursor if cursor == None
This commit is contained in:
1 parent
bf1f79a7cc
commit
b889ee999a
1 file changed
+2
-1
@@ -72,7 +72,8 @@ class DB(Service):
|
||||
logger.notify_channel("web-service", LOG_INFO,
|
||||
'CREATE DB: %s' % (db_name,))
|
||||
finally:
|
||||
cursor.close()
|
||||
if cursor:
|
||||
cursor.close()
|
||||
return res
|
||||
|
||||
def drop(self, password, db_name):
|
||||
|
||||
Reference in new issue
Block a user