aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/hashes.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/hashes.py b/modules/hashes.py
index b7a33b42..d22e5fad 100644
--- a/modules/hashes.py
+++ b/modules/hashes.py
@@ -21,7 +21,10 @@ def calculate_sha256(filename):
def sha256_from_cache(filename, title, use_addnet_hash=False):
hashes = cache("hashes-addnet") if use_addnet_hash else cache("hashes")
- ondisk_mtime = os.path.getmtime(filename)
+ try:
+ ondisk_mtime = os.path.getmtime(filename)
+ except FileNotFoundError:
+ return None
if title not in hashes:
return None