Skip to content
Permalink
Browse files

Detect 64-bit browsers with 32-bit Python

  • Loading branch information
pmeenan committed Jun 16, 2018
1 parent a5c8442 commit 9b530728a7dcd6afa50ccef8ebb9bab0910e9dbb
Showing with 5 additions and 2 deletions.
  1. +5 −2 wptagent.py
@@ -474,8 +474,11 @@ def find_browsers():
plat = platform.system()
if plat == "Windows":
local_appdata = os.getenv('LOCALAPPDATA')
program_files = os.getenv('ProgramFiles')
program_files_x86 = os.getenv('ProgramFiles(x86)')
program_files = str(os.getenv('ProgramFiles'))
program_files_x86 = str(os.getenv('ProgramFiles(x86)'))
# Allow 32-bit python to detect 64-bit browser installs
if program_files == program_files_x86 and program_files.find(' (x86)') >= 0:
program_files = program_files.replace(' (x86)', '')
# Chrome
paths = [program_files, program_files_x86, local_appdata]
channels = ['Chrome', 'Chrome Beta', 'Chrome Dev']

0 comments on commit 9b53072

Please sign in to comment.
You can’t perform that action at this time.