1
0
Fork 0
mirror of synced 2024-06-18 18:34:51 +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
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 {