소스 검색

Try and find out why file is not opened in windows

[ci skip]
Oz N Tiram 8 년 전
부모
커밋
95b459c814
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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()