1
0
Fork 0
mirror of synced 2024-06-29 19:41:05 +12:00

correctly handle WGET_AUTO_COMPRESSION failing when wget is missing

This commit is contained in:
Nick Sweeting 2020-11-12 14:28:43 -05:00
parent fbd9a7caa6
commit 3f160eab8e

View file

@ -643,12 +643,15 @@ def find_chrome_data_dir() -> Optional[str]:
return None return None
def wget_supports_compression(config): def wget_supports_compression(config):
try:
cmd = [ cmd = [
config['WGET_BINARY'], config['WGET_BINARY'],
"--compression=auto", "--compression=auto",
"--help", "--help",
] ]
return not run(cmd, stdout=DEVNULL, stderr=DEVNULL).returncode return not run(cmd, stdout=DEVNULL, stderr=DEVNULL).returncode
except (FileNotFoundError, OSError):
return False
def get_code_locations(config: ConfigDict) -> SimpleConfigValueDict: def get_code_locations(config: ConfigDict) -> SimpleConfigValueDict:
return { return {