Ver Fonte

Close the connection after checking the version

Oz N Tiram há 8 anos atrás
pai
commit
e3a87c7d6c
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      pwman/data/drivers/sqlite.py

+ 3 - 0
pwman/data/drivers/sqlite.py

@@ -40,6 +40,9 @@ class SQLite(Database):
         cur = con.cursor()
         cur.execute("PRAGMA TABLE_INFO(DBVERSION)")
         row = cur.fetchone()
+        cur.close()
+        con.close()
+
         try:
             return row[-2]
         except TypeError: