summaryrefslogtreecommitdiffstats
path: root/tests/units/client.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2023-10-18 13:05:39 +0200
committerJose M. Guisado <jguisado@soleta.eu>2023-10-18 13:32:24 +0200
commitb49ec83bcde10ca6e0066ef5f01b636e11cb4d25 (patch)
treed35757d0530a01e35a5eebbe88d2c86fe5bf3b67 /tests/units/client.py
parent59eac6d0d548b0c855d302f86558f94000a83a0d (diff)
live: hw_inventory: fix empty pci storage size bug
When a client's hardware presents an empty pci storage child there is an invalid call to _bytes_to_human a string is supplied as a default value if the storage child does not present a 'size' attribute. Fix this by checking if 'size' is present in the JSON output from lshw. If size is present then map the bytes to a human readable string using _bytes_to_human, if no size is present then use 'Empty slot' to indicate that the memory bank is not being used.
Diffstat (limited to 'tests/units/client.py')
0 files changed, 0 insertions, 0 deletions