stanford-rc / sasutils

Serial Attached SCSI (SAS) Linux utilities and Python library
Apache License 2.0
62 stars 17 forks source link

unpack_from requires a buffer of at least 1 bytes #12

Closed herbertp closed 5 years ago

herbertp commented 5 years ago
# sas_devices 
Found 2 SAS hosts
Found 3 SAS expanders
Traceback (most recent call last):
  File "/usr/bin/sas_devices", line 9, in <module>
    load_entry_point('sasutils==0.3.9', 'console_scripts', 'sas_devices')()
  File "/usr/lib/python3.5/site-packages/sasutils/cli/sas_devices.py", line 302, in main
    sas_devices_cli.print_end_devices(root)
  File "/usr/lib/python3.5/site-packages/sasutils/cli/sas_devices.py", line 159, in print_end_devices
    lu = vpd_decode_pg83_lu(pg83)
  File "/usr/lib/python3.5/site-packages/sasutils/vpd.py", line 41, in vpd_decode_pg83_lu
    d, = unpack_from('B', pagebuf, offset + 3)
struct.error: unpack_from requires a buffer of at least 1 bytes

Happens when I attach a specific device (SSD) to the topology.

thiell commented 5 years ago

better late than never! thanks for the report @herbertp