mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-18 12:21:42 +02:00
correctly handle WGET_AUTO_COMPRESSION failing when wget is missing
This commit is contained in:
@@ -643,12 +643,15 @@ def find_chrome_data_dir() -> Optional[str]:
|
||||
return None
|
||||
|
||||
def wget_supports_compression(config):
|
||||
cmd = [
|
||||
config['WGET_BINARY'],
|
||||
"--compression=auto",
|
||||
"--help",
|
||||
]
|
||||
return not run(cmd, stdout=DEVNULL, stderr=DEVNULL).returncode
|
||||
try:
|
||||
cmd = [
|
||||
config['WGET_BINARY'],
|
||||
"--compression=auto",
|
||||
"--help",
|
||||
]
|
||||
return not run(cmd, stdout=DEVNULL, stderr=DEVNULL).returncode
|
||||
except (FileNotFoundError, OSError):
|
||||
return False
|
||||
|
||||
def get_code_locations(config: ConfigDict) -> SimpleConfigValueDict:
|
||||
return {
|
||||
|
Reference in New Issue
Block a user