[Python-checkins] r62855 - python/branches/release25-maint/Lib/platform.py
ronald.oussoren
python-checkins at python.org
Thu May 8 12:35:13 CEST 2008
Author: ronald.oussoren
Date: Thu May 8 12:35:13 2008
New Revision: 62855
Log:
Backport of revision 62854
Modified:
python/branches/release25-maint/Lib/platform.py
Modified: python/branches/release25-maint/Lib/platform.py
==============================================================================
--- python/branches/release25-maint/Lib/platform.py (original)
+++ python/branches/release25-maint/Lib/platform.py Thu May 8 12:35:13 2008
@@ -591,7 +591,17 @@
major = (sysv & 0xFF00) >> 8
minor = (sysv & 0x00F0) >> 4
patch = (sysv & 0x000F)
- release = '%s.%i.%i' % (_bcd2str(major),minor,patch)
+
+ if (major, minor) >= (10, 4):
+ # the 'sysv' gestald cannot return patchlevels
+ # higher than 9. Apple introduced 3 new
+ # gestalt codes in 10.4 to deal with this
+ # issue (needed because patch levels can
+ # run higher than 9, such as 10.4.11)
+ major,minor,patch = _mac_ver_lookup(('sys1','sys2','sys3'))
+ release = '%i.%i.%i' %(major, minor, patch)
+ else:
+ release = '%s.%i.%i' % (_bcd2str(major),minor,patch)
if sysu:
major = int((sysu & 0xFF000000L) >> 24)
minor = (sysu & 0x00F00000) >> 20
More information about the Python-checkins
mailing list