# User Ronald Oussoren <ronaldoussoren@mac.com>
# Node ID e267ee9760bd14a8b4270e12af982c941fa7a67d
# Parent bdc069a1a721b28ad21849232bd5426dda871506
Merged revisions 83085 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint
r83085 | ronald.oussoren | 2010-07-23 13:41:00 +0100 (Fri, 23 Jul 2010) | 12 lines
Merged revisions 83075 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
r83075 | ronald.oussoren | 2010-07-23 12:54:59 +0100 (Fri, 23 Jul 2010) | 5 lines
Fix for issue 7895. Avoid crashing the interpreter
when calling platform.mac_ver after calling os.fork by
reading from a system configuration file instead of
diff --git a/Lib/platform.py b/Lib/platform.py
@@ -562,28 +562,20 @@ def _bcd2str(bcd):
-def mac_ver(release='',versioninfo=('','',''),machine=''):
- """ Get MacOS version information and return it as tuple (release,
- versioninfo, machine) with versioninfo being a tuple (version,
- dev_stage, non_release_version).
- Entries which cannot be determined are set to the paramter values
- which default to ''. All tuple entries are strings.
Thanks to Mark R. Levinson for mailing documentation links and
code examples for this function. Documentation for the
gestalt() API is available online at:
http://www.rgaros.nl/gestalt/
# Check whether the version info module is available
- return release,versioninfo,machine
sysv,sysu,sysa = _mac_ver_lookup(('sysv','sysu','sysa'))
@@ -619,6 +611,53 @@ def mac_ver(release='',versioninfo=('','