announce windows 7 in os info

This commit is contained in:
Yann Leboulanger 2009-11-26 23:32:53 +01:00
parent c6dffb8864
commit a7ba440cab
1 changed files with 3 additions and 1 deletions

View File

@ -919,7 +919,8 @@ def get_os_info():
if gajim.os_info:
return gajim.os_info
if os.name == 'nt':
ver = os.sys.getwindowsversion()
# platform.release() seems to return the name of the windows
ver = sys.getwindowsversion()
ver_format = ver[3], ver[0], ver[1]
win_version = {
(1, 4, 0): '95',
@ -930,6 +931,7 @@ def get_os_info():
(2, 5, 1): 'XP',
(2, 5, 2): '2003',
(2, 6, 0): 'Vista',
(2, 6, 1): '7',
}
if ver_format in win_version:
os_info = 'Windows' + ' ' + win_version[ver_format]