Hexlify key
@@ -204,7 +204,7 @@ | ||
204 | 204 | def has_keyhash(self,key): |
205 | 205 | with self.lock: |
206 | 206 | sqlite_conn = sqlite3.connect(DatDBFile) |
207 | - c = sqlite_conn.execute('SELECT COUNT(*) FROM dattbl WHERE hash = ?', (key,)) | |
207 | + c = sqlite_conn.execute('SELECT COUNT(*) FROM dattbl WHERE hash = ?', (hexlify(key),)) | |
208 | 208 | return c.fetchone()[0]==1 |
209 | 209 | def add_dat(self, dat): |
210 | 210 | with self.lock: |