Fix prevent call close on cursor if cursor == None

This commit is contained in:
Cédric Krier committed 2008-06-10 17:03:56 +02:00
1 parent bf1f79a7cc
commit b889ee999a
1 file changed
+2 -1
+2 -1
View File
@@ -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):