aboutsummaryrefslogtreecommitdiff
path: root/modules/hashes.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2024-03-02 07:03:13 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2024-03-02 07:03:13 +0300
commitbef51aed032c0aaa5cfd80445bc4cf0d85b408b5 (patch)
tree42957c454a4ac8d98488f19811b60359d05d88ba /modules/hashes.py
parentcf2772fab0af5573da775e7437e6acdca424f26e (diff)
parent13984857890401e8605a3e53bd671e900a18d73f (diff)
Merge branch 'release_candidate'
Diffstat (limited to 'modules/hashes.py')
-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