]> git.treefish.org Git - photosort.git/commitdiff
fixing registry query
authorAlexander Schmidt <alex@treefish.org>
Tue, 27 Oct 2020 00:16:04 +0000 (01:16 +0100)
committerAlexander Schmidt <alex@treefish.org>
Tue, 27 Oct 2020 00:16:04 +0000 (01:16 +0100)
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