Commit a4e4ef1c authored by Benjamin Peterson's avatar Benjamin Peterson

check for toolbox glue before testing platform.mac_ver intensly

parent 6c78f553
......@@ -65,7 +65,14 @@ class PlatformTest(unittest.TestCase):
def test_mac_ver(self):
res = platform.mac_ver()
if os.uname()[0] == 'Darwin':
try:
import gestalt
except ImportError:
have_toolbox_glue = False
else:
have_toolbox_glue = True
if have_toolbox_glue and os.uname()[0] == 'Darwin':
# We're on a MacOSX system, check that
# the right version information is returned
fd = os.popen('sw_vers', 'r')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment