]> git.treefish.org Git - photosort.git/blobdiff - src/registry.py
clean registry only once after migration
[photosort.git] / src / registry.py
index 4eff031387c37afcb0b3778b9b421c371236ba36..a2bad868dc71e3ca17a3facfc50036bcccc808bd 100644 (file)
@@ -18,7 +18,7 @@ class Registry:
         if not self._conn: return False
         c = self._conn.cursor()
         c.execute("SELECT COUNT(*) FROM cache WHERE name=?", (name,))
-        return c.fetchone() != None
+        return c.fetchone()[0] == 1
 
     def clean(self):
         if not self._conn: return