Parcourir la source

Close the connection after checking the version

Oz N Tiram il y a 8 ans
Parent
commit
e3a87c7d6c
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  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: