From 41a3148d3ae36f530b1d13cf8c173c7369bdf800 Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Tue, 9 Aug 2022 18:54:11 +0300 Subject: [PATCH] storage: Fix enumerating partitions without mount points Fixes an issue where accessing Storage and Samba app pages throws a HTTP error 500 when there are disk partitions without mount points. Fixes #1904 #2245 Tested when an USB stick with Debian installer image is attached to Freedombox board - both Storage and Samba apps work. Signed-off-by: Veiko Aasa --- plinth/modules/storage/udisks2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/modules/storage/udisks2.py b/plinth/modules/storage/udisks2.py index 466bce0f4..a98d985c8 100644 --- a/plinth/modules/storage/udisks2.py +++ b/plinth/modules/storage/udisks2.py @@ -170,7 +170,7 @@ def get_disks(): } try: file_system = Filesystem(object_) - device['mount_points'] = file_system.mount_points + device['mount_points'] = file_system.mount_points or [] except Exception: continue