bugfix with none in the mac serial
This commit is contained in:
parent
b56c3d3e0a
commit
0ab8a36832
|
@ -462,8 +462,9 @@ class Computer(Device):
|
|||
self.set_hid()
|
||||
if not self.hid:
|
||||
return
|
||||
components = self.components if components_snap == None else components_snap
|
||||
macs_network= [c.serial_number for c in components if c.type == 'NetworkAdapter']
|
||||
components = self.components if components_snap is None else components_snap
|
||||
macs_network = [c.serial_number for c in components
|
||||
if c.type == 'NetworkAdapter' and c.serial_number is not None]
|
||||
macs_network.sort()
|
||||
mac = macs_network[0] if macs_network else ''
|
||||
if not mac or mac in self.hid:
|
||||
|
|
Reference in New Issue