netbox-agent icon indicating copy to clipboard operation
netbox-agent copied to clipboard

Cdrom size error

Open heurtel opened this issue 5 years ago • 1 comments

Hello,

The script seem to detect cdrom as a disk but as there is no size for it, i get the following error :

Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/netbox-agent/netbox_agent/cli.py", line 48, in main() File "/tmp/netbox-agent/netbox_agent/cli.py", line 44, in main return run(config) File "/tmp/netbox-agent/netbox_agent/cli.py", line 39, in run server.netbox_create_or_update(config) File "/tmp/netbox-agent/netbox_agent/server.py", line 296, in netbox_create_or_update self.inventory.create_or_update() File "/tmp/netbox-agent/netbox_agent/inventory.py", line 447, in create_or_update self.do_netbox_disks() File "/tmp/netbox-agent/netbox_agent/inventory.py", line 385, in do_netbox_disks disks = self.get_hw_disks() File "/tmp/netbox-agent/netbox_agent/inventory.py", line 326, in get_hw_disks d['Size'] = '{} GB'.format(int(size / 1024 / 1024 / 1024)) TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

heurtel avatar Jul 31 '20 08:07 heurtel

would you be able to give me the lshw -quiet -json output ?

thanks

Solvik avatar Aug 05 '20 14:08 Solvik