aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Harddisk.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components/Harddisk.py')
-rwxr-xr-x[-rw-r--r--]lib/python/Components/Harddisk.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py
index d165e26c..75d68fad 100644..100755
--- a/lib/python/Components/Harddisk.py
+++ b/lib/python/Components/Harddisk.py
@@ -519,4 +519,18 @@ class HarddiskManager:
description += " (Partition %d)" % part
return description
+ def addMountedPartition(self, device, desc):
+ already_mounted = False
+ for x in self.partitions[:]:
+ if x.mountpoint == device:
+ already_mounted = True
+ if not already_mounted:
+ self.partitions.append(Partition(mountpoint = device, description = desc))
+
+ def removeMountedPartition(self, mountpoint):
+ for x in self.partitions[:]:
+ if x.mountpoint == mountpoint:
+ self.partitions.remove(x)
+ self.on_partition_list_change("remove", x)
+
harddiskmanager = HarddiskManager()