From: Alexander Schmidt Date: Tue, 27 Oct 2020 00:16:04 +0000 (+0100) Subject: fixing registry query X-Git-Url: http://git.treefish.org/~alex/photosort.git/commitdiff_plain/1befba228a239882adefcb7b92eb5f8f83178d62 fixing registry query --- diff --git a/src/registry.py b/src/registry.py index 4eff031..a2bad86 100644 --- a/src/registry.py +++ b/src/registry.py @@ -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