summaryrefslogtreecommitdiffstats
path: root/Lib/platform.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-03-22 15:55:09 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2010-03-22 15:55:09 (GMT)
commitc9d1a7845ba18466ee048666239c6b969c9acd33 (patch)
tree210da589b2775dba41f8eaad367b5de072fe5118 /Lib/platform.py
parent804899b4ab873144ffc12c145fc4266489454c21 (diff)
downloadcpython-c9d1a7845ba18466ee048666239c6b969c9acd33.zip
cpython-c9d1a7845ba18466ee048666239c6b969c9acd33.tar.gz
cpython-c9d1a7845ba18466ee048666239c6b969c9acd33.tar.bz2
Issue #7860: platform.uname now reports the correct 'machine' type
when Python is running in WOW64 mode on 64 bit Windows. Patch by Brian Curtin.
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-xLib/platform.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index fc39b89..080b836 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -1127,7 +1127,11 @@ def uname():
# http://support.microsoft.com/kb/888731 and
# http://www.geocities.com/rick_lively/MANUALS/ENV/MSWIN/PROCESSI.HTM
if not machine:
- machine = os.environ.get('PROCESSOR_ARCHITECTURE', '')
+ # WOW64 processes mask the native architecture
+ if "PROCESSOR_ARCHITEW6432" in os.environ:
+ machine = os.environ.get("PROCESSOR_ARCHITEW6432", '')
+ else:
+ machine = os.environ.get('PROCESSOR_ARCHITECTURE', '')
if not processor:
processor = os.environ.get('PROCESSOR_IDENTIFIER', machine)