check for file existence before attempting to read the contents.

This commit is contained in:
ArabCoders 2024-10-31 23:46:08 +03:00
parent f76e9b8f77
commit d837fb7d1b

View file

@ -667,6 +667,7 @@ class Main:
manual_archive = self.config.manual_archive manual_archive = self.config.manual_archive
if manual_archive: if manual_archive:
previouslyArchived = False previouslyArchived = False
if os.path.exists(manual_archive):
with open(manual_archive, 'r') as f: with open(manual_archive, 'r') as f:
for line in f.readlines(): for line in f.readlines():
if idDict['archive_id'] in line: if idDict['archive_id'] in line: