From 21a0c65ed623d5ea566789166a95cbe267e61a76 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 21 Jan 2021 19:36:21 +0100 Subject: [PATCH] diagnosis: Ignore /dev/loop devices in systemresources --- data/hooks/diagnosis/50-systemresources.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/hooks/diagnosis/50-systemresources.py b/data/hooks/diagnosis/50-systemresources.py index 64517f764..30a2ad1f8 100644 --- a/data/hooks/diagnosis/50-systemresources.py +++ b/data/hooks/diagnosis/50-systemresources.py @@ -69,6 +69,9 @@ class SystemResourcesDiagnoser(Diagnoser): disk_partitions = sorted(psutil.disk_partitions(), key=lambda k: k.mountpoint) + # Ignore /dev/loop stuff which are ~virtual partitions ? (e.g. mounted to /snap/) + disk_partitions = [d for d in disk_partitions if not d.device.startswith("/dev/loop")] + for disk_partition in disk_partitions: device = disk_partition.device mountpoint = disk_partition.mountpoint