diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..47985022e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.exe +*.pyc +*.txt \ No newline at end of file diff --git a/modules/chrome_driver_installer.py b/modules/chrome_driver_installer.py index 07e439bb91..139ae8f0f6 100644 --- a/modules/chrome_driver_installer.py +++ b/modules/chrome_driver_installer.py @@ -48,10 +48,11 @@ def get_chrome_version(): process = Popen(["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", "--version"], stdout=PIPE) chrome_version = process.communicate()[0].decode("UTF-8").replace("Google Chrome", "").strip() elif platform == "win": - chrome_version = match(r"\d{2,3}.0.\d{4}.\d{1,3}", ' '.join(listdir("C:/Program Files/Google/Chrome/Application"))) - if chrome_version is not None: - chrome_version = chrome_version.group() - else: + try: + chrome_version = match(r"\d{2,3}.0.\d{4}.\d{1,3}", ' '.join(listdir("C:/Program Files/Google/Chrome/Application"))) + if chrome_version is not None: + chrome_version = chrome_version.group() + except: chrome_version = match(r"\d{2,3}.0.\d{4}.\d{1,3}", ' '.join(listdir("C:/Program Files (x86)/Google/Chrome/Application"))) if chrome_version is not None: chrome_version = chrome_version.group()