some power fixes
This commit is contained in:
parent
754a284fd1
commit
b94f246196
1 changed files with 8 additions and 1 deletions
|
@ -29,8 +29,15 @@ class PowerSupply():
|
|||
psu.get('Manufacturer', 'No Manufacturer').strip(),
|
||||
psu.get('Name', 'No name').strip(),
|
||||
)
|
||||
|
||||
sn = psu.get('Serial Number', '').strip()
|
||||
# Let's assume that if no serial and no power reported we skip it
|
||||
if sn == '' and max_power == None:
|
||||
continue
|
||||
if sn == '':
|
||||
sn = 'N/A'
|
||||
power_supply.append({
|
||||
'name': psu.get('Serial Number', 'No S/N').strip(),
|
||||
'name': sn,
|
||||
'description': desc,
|
||||
'allocated_draw': None,
|
||||
'maximum_draw': max_power,
|
||||
|
|
Loading…
Reference in a new issue