Fix architecture detection on 32 bit Windows. Fixes #1427

This commit is contained in:
Dave Page
2016-07-01 15:50:28 +01:00
parent 7b3b7736d9
commit 9c39fe2f2e

View File

@@ -264,7 +264,11 @@ def create_app(app_name=config.APP_NAME):
# Figure out what servers are present
if os.name == 'nt':
proc_arch = os.environ['PROCESSOR_ARCHITECTURE'].lower()
proc_arch64 = os.environ['PROCESSOR_ARCHITEW6432'].lower()
try:
proc_arch64 = os.environ['PROCESSOR_ARCHITEW6432'].lower()
except:
proc_arch64 = None
if proc_arch == 'x86' and not proc_arch64:
arch_keys = {0}