]> git.treefish.org Git - photosort.git/commitdiff
disable sqlite same thread check
authorAlexander Schmidt <alex@treefish.org>
Mon, 26 Oct 2020 22:43:36 +0000 (23:43 +0100)
committerAlexander Schmidt <alex@treefish.org>
Mon, 26 Oct 2020 22:43:36 +0000 (23:43 +0100)
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):