mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
Merged revisions 79294 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79294 | r.david.murray | 2010-03-22 11:55:09 -0400 (Mon, 22 Mar 2010) | 4 lines 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. ........
This commit is contained in:
parent
37c1f18a72
commit
ca2edce676
3 changed files with 29 additions and 1 deletions
|
@ -1103,7 +1103,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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue