diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-02-13 15:11:21 +0100 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-02-13 15:11:21 +0100 |
| commit | 935c5f9abeb0d6189c57f8406855d8437db8b0db (patch) | |
| tree | 1fdce1e69db6448fc8332f9e656868902ca40d1b /lib/python/Components/Harddisk.py | |
| parent | 09dca95c63c7c9df2ccf08332f11b69673156e5b (diff) | |
| parent | da0da334b1314329d7d1f294d8df59acf66ac0d0 (diff) | |
| download | enigma2-935c5f9abeb0d6189c57f8406855d8437db8b0db.tar.gz enigma2-935c5f9abeb0d6189c57f8406855d8437db8b0db.zip | |
Merge branch 'master' of git://git.opendreambox.org/git/acidburn/enigma2-master
Diffstat (limited to 'lib/python/Components/Harddisk.py')
| -rwxr-xr-x[-rw-r--r--] | lib/python/Components/Harddisk.py | 14 |
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() |
