Return false for isInDB if DB does not exist

Fixes #10
This commit is contained in:
Effy Elden
2023-08-27 12:23:16 +10:00
committed by GitHub
parent 00cce1d88c
commit d05db6b305

View File

@@ -373,6 +373,8 @@ def jsonRead():
# Function for checking if a line is already in the database-file
def isInDB(line):
if not os.path.exists(databasePath):
return False
with open(databasePath, 'r') as file:
content = file.read()
if line in content: