mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
storage: Handle file systems on non-physical devices
Fixes: #2126. Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
0e0f5e5a86
commit
c4b17130d4
@ -159,7 +159,7 @@ def _get_disks_from_df():
|
|||||||
|
|
||||||
def get_filesystem_type(mount_point='/'):
|
def get_filesystem_type(mount_point='/'):
|
||||||
"""Return the type of the filesystem mounted at mountpoint."""
|
"""Return the type of the filesystem mounted at mountpoint."""
|
||||||
for partition in psutil.disk_partitions():
|
for partition in psutil.disk_partitions(all=True):
|
||||||
if partition.mountpoint == mount_point:
|
if partition.mountpoint == mount_point:
|
||||||
return partition.fstype
|
return partition.fstype
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user