summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-01-13 19:34:19 (GMT)
committerNed Deily <nad@acm.org>2014-01-13 19:34:19 (GMT)
commit936dfae2e22b5b58d01416ddf47218c20bfde5e6 (patch)
tree6e591cbc28257ff0fc141d77b897dd3db05a7ab7 /Lib
parent75ff6d284a2c68eb752997cd05a1bdac4187b355 (diff)
downloadcpython-936dfae2e22b5b58d01416ddf47218c20bfde5e6.zip
cpython-936dfae2e22b5b58d01416ddf47218c20bfde5e6.tar.gz
cpython-936dfae2e22b5b58d01416ddf47218c20bfde5e6.tar.bz2
Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver().
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/platform.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 48b81ac..11b501e 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -649,7 +649,8 @@ def _mac_ver_xml():
except ImportError:
return None
- pl = plistlib.readPlist(fn)
+ with open(fn, 'rb') as f:
+ pl = plistlib.load(f)
release = pl['ProductVersion']
versioninfo = ('', '', '')
machine = os.uname().machine