diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-02-07 11:29:31 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-02-07 11:29:31 (GMT) |
commit | 9341ad22002ca300d3d2e3d71b60f13e5638a5a4 (patch) | |
tree | 30a714536703863604e13a24ddf7fb74e09614d8 | |
parent | 657514a69039ad60af1b3b98254dff863d800d95 (diff) | |
download | cpython-9341ad22002ca300d3d2e3d71b60f13e5638a5a4.zip cpython-9341ad22002ca300d3d2e3d71b60f13e5638a5a4.tar.gz cpython-9341ad22002ca300d3d2e3d71b60f13e5638a5a4.tar.bz2 |
Remove call to gestalt('sysu') from platform.py. This gestalt call is
not available on OSX an appearently causes problems for some users.
Fixes issue 7812
-rwxr-xr-x | Lib/platform.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/Lib/platform.py b/Lib/platform.py index 829d5f0..fc39b89 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -733,7 +733,7 @@ def mac_ver(release='',versioninfo=('','',''),machine=''): except ImportError: return release,versioninfo,machine # Get the infos - sysv,sysu,sysa = _mac_ver_lookup(('sysv','sysu','sysa')) + sysv,sysa = _mac_ver_lookup(('sysv','sysa')) # Decode the infos if sysv: major = (sysv & 0xFF00) >> 8 @@ -751,24 +751,6 @@ def mac_ver(release='',versioninfo=('','',''),machine=''): else: release = '%s.%i.%i' % (_bcd2str(major),minor,patch) - if sysu: - # NOTE: this block is left as documentation of the - # intention of this function, the 'sysu' gestalt is no - # longer available and there are no alternatives. - major = int((sysu & 0xFF000000L) >> 24) - minor = (sysu & 0x00F00000) >> 20 - bugfix = (sysu & 0x000F0000) >> 16 - stage = (sysu & 0x0000FF00) >> 8 - nonrel = (sysu & 0x000000FF) - version = '%s.%i.%i' % (_bcd2str(major),minor,bugfix) - nonrel = _bcd2str(nonrel) - stage = {0x20:'development', - 0x40:'alpha', - 0x60:'beta', - 0x80:'final'}.get(stage,'') - versioninfo = (version,stage,nonrel) - - if sysa: machine = {0x1: '68k', 0x2: 'PowerPC', |