def processLabel(self, result, lv): label, err, code = result if code == 0 and label.strip() == 'backharddi': lv['e2label'] = label.strip() part = Partition(lv) self.bngparts.append(part) part.mount(self.root + os.sep + part.name)
def initHal(self): log.msg('Conectando a HAL...') bus = dbus.SystemBus() halmanager = bus.get_object ("org.freedesktop.Hal", "/org/freedesktop/Hal/Manager") self.hal = dbus.Interface(halmanager, "org.freedesktop.Hal.Manager") volumes = self.hal.FindDeviceByCapability("volume") for vol_uri in volumes: vol = bus.get_object ("org.freedesktop.Hal", vol_uri) vol = dbus.Interface(vol, "org.freedesktop.Hal.Device") vol = vol.GetAllProperties() if vol['volume.fstype'] in ['ext3', 'ext4'] and vol['volume.label'] in ["backharddi"]: part = Partition(vol) self.bngparts.append(part) part.mount(self.root + os.sep + part.name)