mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2025-03-06 16:17:22 +00:00
dont get bin path when bin is missing
This commit is contained in:
parent
1b96c582a7
commit
3c7966c13a
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ import getpass
|
|||
import shutil
|
||||
|
||||
from hashlib import md5
|
||||
from pathlib import Path
|
||||
from typing import Optional, Type, Tuple, Dict
|
||||
from subprocess import run, PIPE, DEVNULL
|
||||
from configparser import ConfigParser
|
||||
|
@ -495,7 +496,7 @@ def bin_hash(binary: Optional[str]) -> Optional[str]:
|
|||
if binary is None:
|
||||
return None
|
||||
abs_path = bin_path(binary)
|
||||
if abs_path is None:
|
||||
if abs_path is None or not Path(abs_path).exists():
|
||||
return None
|
||||
|
||||
file_hash = md5()
|
||||
|
|
Loading…
Add table
Reference in a new issue