Updated get_ram_list_linux()

This commit is contained in:
2Shirt 2019-11-13 11:14:55 -07:00
parent e18b625281
commit 0eadb784bb
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -633,7 +633,11 @@ def get_ram_list_linux():
size = 0 size = 0
elif line.startswith('Size:'): elif line.startswith('Size:'):
size = line.replace('Size: ', '') size = line.replace('Size: ', '')
size = string_to_bytes(size, assume_binary=True) try:
size = string_to_bytes(size, assume_binary=True)
except ValueError:
# Assuming empty module
size = 0
elif line.startswith('Manufacturer:'): elif line.startswith('Manufacturer:'):
manufacturer = line.replace('Manufacturer: ', '') manufacturer = line.replace('Manufacturer: ', '')
dimm_list.append([size, manufacturer]) dimm_list.append([size, manufacturer])