summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-29 21:09:51 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-05-29 21:09:51 (GMT)
commitebacd26869220b2f300d1b88c59ec3efc60ac00d (patch)
tree9a1f9a3850fb50f9971fceb633d254e0c8230d1e /Lib
parent7dca3ebc97661da9fe2945b9c65d58c234d10629 (diff)
downloadcpython-ebacd26869220b2f300d1b88c59ec3efc60ac00d.zip
cpython-ebacd26869220b2f300d1b88c59ec3efc60ac00d.tar.gz
cpython-ebacd26869220b2f300d1b88c59ec3efc60ac00d.tar.bz2
add the gestalt module back as _gestalt
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/platform.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 415d83f..2a69fd6 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -676,14 +676,13 @@ def win32_ver(release='',version='',csd='',ptype=''):
def _mac_ver_lookup(selectors,default=None):
- from gestalt import gestalt
- import MacOS
+ from _gestalt import gestalt
l = []
append = l.append
for selector in selectors:
try:
append(gestalt(selector))
- except (RuntimeError, MacOS.Error):
+ except (RuntimeError, OSError):
append(default)
return l
@@ -709,8 +708,7 @@ def mac_ver(release='',versioninfo=('','',''),machine=''):
"""
# Check whether the version info module is available
try:
- import gestalt
- import MacOS
+ import _gestalt
except ImportError:
return release,versioninfo,machine
# Get the infos