Skip to content

Commit

Permalink
"[FlashExpander]" fix crash if disk empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jbleyel authored and fairbird committed Jan 3, 2025
1 parent afb01d8 commit 90c8ec0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/python/Screens/FlashExpander.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,12 @@ def readDevices(self, callback=None):

print("[FlashExpander] DEBUG: uuids -> ", uuids)

for (name, hdd) in harddiskmanager.HDDList():
print("[FlashExpander] DEBUG: HDDList", hdd.device, hdd.dev_path)
uuid, device = uuids.get(hdd.device)
if uuid:
self.deviceData[uuid] = (device, name)
if uuids:
for (name, hdd) in harddiskmanager.HDDList():
print("[FlashExpander] DEBUG: HDDList", hdd.device, hdd.dev_path)
uuid, device = uuids.get(hdd.device)
if uuid:
self.deviceData[uuid] = (device, name)

print("[FlashExpander] DEBUG: self.deviceData", self.deviceData)
self.updateStatus()
Expand Down

0 comments on commit 90c8ec0

Please sign in to comment.