Skip to content

Commit 17c1176

Browse files
authored
Update skyhookDb.py
1 parent b909785 commit 17c1176

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

skyhookDb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ def deleteItem(identifier):
9898
return(2)
9999

100100
def getEntry(fileHash):
101-
fileName, password = cursor.execute("SELECT DISTINCT name, key FROM history WHERE hash = ?", (fileHash,)).fetchone()
102-
if fileName == None or password == None:
101+
try:
102+
fileName, password = cursor.execute("SELECT DISTINCT name, key FROM history WHERE hash = ?", (fileHash,)).fetchone()
103+
except:
103104
return(1, 1)
104-
else:
105-
return(fileName, password)
105+
return(fileName, password)
106106

107107
def addToHistory(name, hash, key, date):
108108
try:

0 commit comments

Comments
 (0)