]> git.treefish.org Git - photosort.git/blobdiff - src/locator.py
disable sqlite same thread check
[photosort.git] / src / locator.py
index 7a57e090cba90548ffdc5ccf7bb09f0615f21c97..ff74e0c8d894adf43e3fd11e4513943333db7a75 100644 (file)
@@ -10,10 +10,10 @@ class Locator:
         self._base_dir = base_dir
         self._exclude_dir = exclude_dir
         if not os.path.isfile(db_file):
-            self._conn = sqlite3.connect(db_file)
+            self._conn = sqlite3.connect(db_file, check_same_thread=False)
             self._create_db()
         else:
-            self._conn = sqlite3.connect(db_file)
+            self._conn = sqlite3.connect(db_file, check_same_thread=False)
         logging.info("Opened locator for %s.", self._base_dir)
 
     def locate_file(self, name, size, meta_time):