Skip to content

Commit

Permalink
Skip empty disks (empty SD card reader)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvps committed Oct 25, 2024
1 parent 98ce2a2 commit 08ff05d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions basilico.py
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,10 @@ def get_disks_linux(path: Optional[str] = None) -> list:
else:
result = []
for el in result:
# Skip empty disks (empty SD card reader)
if el["size"] == 0:
continue

mounts = find_mounts(el)
if "children" in el:
del el["children"]
Expand Down

0 comments on commit 08ff05d

Please sign in to comment.