From 08ff05d85d8055eb435eb157ce5515432aaa1b64 Mon Sep 17 00:00:00 2001 From: Ludovico Pavesi Date: Fri, 25 Oct 2024 21:47:24 +0200 Subject: [PATCH] Skip empty disks (empty SD card reader) --- basilico.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/basilico.py b/basilico.py index 6dddbbd..ede5638 100755 --- a/basilico.py +++ b/basilico.py @@ -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"]