aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-10-08 15:36:49 +0000
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-10-08 15:36:49 +0000
commit7416bb955a8eee1764a969116a54e3996fec429d (patch)
tree4b7a46276d9a748aa9fe2bd948f47098a302672f /lib/python/Components
parentdb46f952f934ea8532527cbbdf21ef283cacda20 (diff)
downloadenigma2-7416bb955a8eee1764a969116a54e3996fec429d.tar.gz
enigma2-7416bb955a8eee1764a969116a54e3996fec429d.zip
get rid of hardcoded path to cdrom device
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/Harddisk.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py
index dfc262d8..a5727cf7 100644
--- a/lib/python/Components/Harddisk.py
+++ b/lib/python/Components/Harddisk.py
@@ -248,7 +248,7 @@ class Partition:
class HarddiskManager:
def __init__(self):
self.hdd = [ ]
-
+ self.cd = ""
self.partitions = [ ]
self.on_partition_list_change = CList()
@@ -301,6 +301,8 @@ class HarddiskManager:
if partition[0:len(blockdev)] != blockdev:
continue
partitions.append(partition)
+ else:
+ self.cd = "/dev/"+blockdev
except IOError:
error = True
return error, blacklisted, removable, is_cdrom, partitions
@@ -363,6 +365,9 @@ class HarddiskManager:
list.append((hdd, hd))
return list
+ def getCD(self):
+ return self.cd
+
def getMountedPartitions(self, onlyhotplug = False):
return [x for x in self.partitions if (x.is_hotplug or not onlyhotplug) and x.mounted()]