Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cdrom size error #159

Open
heurtel opened this issue Jul 31, 2020 · 1 comment
Open

Cdrom size error #159

heurtel opened this issue Jul 31, 2020 · 1 comment

Comments

@heurtel
Copy link

heurtel commented Jul 31, 2020

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'

@Solvik
Copy link
Owner

Solvik commented Aug 5, 2020

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

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants