We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30a18a3 commit d9002ffCopy full SHA for d9002ff
modules/hashes.py
@@ -21,7 +21,10 @@ def calculate_sha256(filename):
21
22
def sha256_from_cache(filename, title, use_addnet_hash=False):
23
hashes = cache("hashes-addnet") if use_addnet_hash else cache("hashes")
24
- ondisk_mtime = os.path.getmtime(filename)
+ try:
25
+ ondisk_mtime = os.path.getmtime(filename)
26
+ except FileNotFoundError:
27
+ return None
28
29
if title not in hashes:
30
return None
0 commit comments