aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources.py
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2010-05-06 18:10:32 +0200
committerTarek Ziade <tarek@ziade.org>2010-05-06 18:10:32 +0200
commit6a6a261fa50522d77fba6d6345fb71ba9f00c311 (patch)
tree4d025291624e9ce33cfed1400b13907d8384d145 /pkg_resources.py
parent3cd5038930832fce95fb41d20150e173eb9894b5 (diff)
downloadexternal_python_setuptools-6a6a261fa50522d77fba6d6345fb71ba9f00c311.tar.gz
external_python_setuptools-6a6a261fa50522d77fba6d6345fb71ba9f00c311.tar.bz2
external_python_setuptools-6a6a261fa50522d77fba6d6345fb71ba9f00c311.zip
make sure all tests passes on all python versions fixes #149
--HG-- branch : distribute extra : rebase_source : 6288f4fcf65083b9d4ffb0ea8b35af44e699b4d5
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 6d96f5c2..6ec51fa0 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -191,9 +191,10 @@ def _macosx_vers(_cache=[]):
import plistlib
plist = '/System/Library/CoreServices/SystemVersion.plist'
if os.path.exists(plist):
- plist_content = plistlib.readPlist(plist)
- if 'ProductVersion' in plist_content:
- version = plist_content['ProductVersion']
+ if hasattr(plistlib, 'readPlist'):
+ plist_content = plistlib.readPlist(plist)
+ if 'ProductVersion' in plist_content:
+ version = plist_content['ProductVersion']
_cache.append(version.split('.'))
return _cache[0]