in usb_monitor_pkg/usb_monitor_pkg/mount_point_tracker.py [0:0]
def get_mount_points(self, filesystem):
"""Return the list of mount points.
Args:
filesystem (str): Filesystem type to be mounted.
Returns:
list: List of mount points.
"""
mount_points = list()
try:
with open(os.path.join(os.sep, "proc", "mounts")) as mount_list:
for line in mount_list:
components = line.strip().split()
if len(components) < 2:
continue
_filesystem = components[0].strip()
mount_point = components[1].strip()
if _filesystem == filesystem:
mount_points.append(mount_point)
except Exception:
pass
return mount_points