Ver Fonte

Try and find out why file is not opened in windows

[ci skip]
Oz N Tiram há 8 anos atrás
pai
commit
95b459c814
1 ficheiros alterados com 6 adições e 1 exclusões
  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()