do not fail if user runs vista

This commit is contained in:
Nikos Kouremenos 2005-10-21 17:00:37 +00:00
parent f79a90a3ca
commit 2abc302ce9
1 changed files with 7 additions and 4 deletions

View File

@ -89,6 +89,8 @@ distro_info = {
def get_os_info():
if os.name == 'nt':
ver = os.sys.getwindowsversion()
ver_format = ver[3], ver[0], ver[1]
win_version = {
(1, 4, 0): '95',
(1, 4, 10): '98',
@ -97,10 +99,11 @@ def get_os_info():
(2, 5, 0): '2000',
(2, 5, 1): 'XP',
(2, 5, 2): '2003'
}[ os.sys.getwindowsversion()[3],
os.sys.getwindowsversion()[0],
os.sys.getwindowsversion()[1] ]
return 'Windows' + ' ' + win_version
}
if win_version.has_key(ver_format):
return 'Windows' + ' ' + win_version[ver_format]
else:
return 'Windows'
elif os.name == 'posix':
executable = 'lsb_release'
params = ' --id --codename --release --short'