mirror of https://gitlab.com/baco/winsysinfo.git
Correct exception generated when no service pack is present
This commit is contained in:
parent
8b23c6d977
commit
0203e53bd9
|
@ -33,7 +33,6 @@ class SystemInformation:
|
|||
for part in self._disk_c():
|
||||
hdd.append('{} {:.2f}GB free'.format(part[0], part[1]/(1024**3)))
|
||||
self.hdFree = 'HDD:\t{}'.format(', '.join(hdd))
|
||||
# self.hdFree = 'HDD:\t{:.2f}GB free'.format(self._disk_c()/(1024**3))
|
||||
self.os = 'OS:\t{}'.format(self._os_version())
|
||||
|
||||
def _cpu(self):
|
||||
|
@ -115,7 +114,10 @@ class SystemInformation:
|
|||
try:
|
||||
sp = get('CSDVersion')
|
||||
except:
|
||||
sp = get('CSDBuildNumber')
|
||||
try:
|
||||
sp = 'n' + get('CSDBuildNumber')
|
||||
except:
|
||||
sp = '(no service pack found)'
|
||||
build = get('CurrentBuildNumber')
|
||||
return '{} {} (build {})'.format(os, sp, build)
|
||||
|
||||
|
|
Loading…
Reference in New Issue