summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-09-23 00:35:55 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2015-09-23 00:35:55 (GMT)
commit697c43d389462f3f1f2ff5fb867442d712f77cb4 (patch)
treed02142a2454ba826e95fd83f98c886970914737c
parent82f6cabbeec991214525b0ba7031cc94793767bf (diff)
parent5b1640cd2bcab78b3c14ac425b9d2c6d7926df17 (diff)
downloadcpython-697c43d389462f3f1f2ff5fb867442d712f77cb4.zip
cpython-697c43d389462f3f1f2ff5fb867442d712f77cb4.tar.gz
cpython-697c43d389462f3f1f2ff5fb867442d712f77cb4.tar.bz2
Merge from 3.5
-rwxr-xr-xLib/platform.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index ecc9fb3..f3d2c42 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -560,7 +560,10 @@ def _get_real_winver(maj, min, build):
return maj, min, build
def win32_ver(release='', version='', csd='', ptype=''):
- from sys import getwindowsversion
+ try:
+ from sys import getwindowsversion
+ except ImportError:
+ return release, version, csd, ptype
try:
from winreg import OpenKeyEx, QueryValueEx, CloseKey, HKEY_LOCAL_MACHINE
except ImportError: