瀏覽代碼

Close the connection after checking the version

Oz N Tiram 8 年之前
父節點
當前提交
e3a87c7d6c
共有 1 個文件被更改,包括 3 次插入0 次删除
  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: