Commit 8f278f16 authored by Steve Dower's avatar Steve Dower

Handle calls to win32_ver from non-Windows platform

parent 64a3387d
...@@ -546,7 +546,10 @@ def _get_real_winver(maj, min, build): ...@@ -546,7 +546,10 @@ def _get_real_winver(maj, min, build):
return maj, min, build return maj, min, build
def win32_ver(release='', version='', csd='', ptype=''): def win32_ver(release='', version='', csd='', ptype=''):
try:
from sys import getwindowsversion from sys import getwindowsversion
except ImportError:
return release, version, csd, ptype
try: try:
from winreg import OpenKeyEx, QueryValueEx, CloseKey, HKEY_LOCAL_MACHINE from winreg import OpenKeyEx, QueryValueEx, CloseKey, HKEY_LOCAL_MACHINE
except ImportError: except ImportError:
......
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