Pārlūkot izejas kodu

Try and find out why file is not opened in windows

[ci skip]
Oz N Tiram 8 gadi atpakaļ
vecāks
revīzija
95b459c814
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. 6 1
      pwman/data/drivers/sqlite.py

+ 6 - 1
pwman/data/drivers/sqlite.py

@@ -57,7 +57,12 @@ class SQLite(Database):
         self._data_wrapper = lambda x: x
 
     def _open(self):
-        self._con = sqlite.connect(self._filename)
+        try:
+            self._con = sqlite.connect(self._filename)
+        except sqlite.OperationalError as E:
+            print("could not open %s" % self._fname)
+            raise E
+
         self._cur = self._con.cursor()
         self._create_tables()