return -3
return 0
+
+ def getDeviceDir(self):
+ return self.devidex
+
+ def getDeviceName(self):
+ return self.getDeviceDir() + "disc"
class Partition:
def __init__(self, mountpoint, description = "", force_mounted = False):
class HarddiskManager:
def __init__(self):
self.hdd = [ ]
-
+ self.cd = ""
self.partitions = [ ]
self.on_partition_list_change = CList()
if partition[0:len(blockdev)] != blockdev:
continue
partitions.append(partition)
+ else:
+ self.cd = blockdev
except IOError:
error = True
return error, blacklisted, removable, is_cdrom, partitions
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()]