Fix boring macos issue (booo for macos users).

This commit is contained in:
sfigato 2019-03-01 09:07:05 +01:00 committed by blallo
parent c7daefb9b7
commit 91c2cc4717
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F

View File

@ -108,6 +108,16 @@ def ensure_local_folder() -> None:
pkg_resources.ensure_directory(bin_path) pkg_resources.ensure_directory(bin_path)
PLATFORM_MAP = {
"win32": "win32",
"win64": "win64",
"linux32": "linux32",
"linux64": "linux64",
"darwin64": "macos",
"darwin32": "macos", # This is impossible (?)
}
def assemble_driver_uri( def assemble_driver_uri(
version: T.Optional[str] = None, platform: T.Optional[str] = None version: T.Optional[str] = None, platform: T.Optional[str] = None
) -> str: ) -> str:
@ -129,7 +139,7 @@ def assemble_driver_uri(
else: else:
ext = "tar.gz" ext = "tar.gz"
return "{base}/releases/download/{vers}/geckodriver-{vers}-{platform}.{ext}".format( return "{base}/releases/download/{vers}/geckodriver-{vers}-{platform}.{ext}".format(
base=GECKO_RELEASE_PATH, vers=version, platform=platform, ext=ext base=GECKO_RELEASE_PATH, vers=version, platform=PLATFORM_MAP[platform], ext=ext
) )