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 <veiko17@disroot.org>
This commit is contained in:
Veiko Aasa 2022-08-09 18:54:11 +03:00 committed by Sunil Mohan Adapa
parent 12d02fecfb
commit 41a3148d3a
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -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