This commit is contained in:
Kovid Goyal 2012-02-02 23:11:40 +05:30
parent 45d57f4ee5
commit d7b1624ec6
2 changed files with 4 additions and 8 deletions

View File

@ -160,7 +160,6 @@ class FreeBSDScanner(object):
def __call__(self): def __call__(self):
ans = set([]) ans = set([])
import dbus import dbus
devs = []
try: try:
bus = dbus.SystemBus() bus = dbus.SystemBus()
@ -170,7 +169,6 @@ class FreeBSDScanner(object):
for path in paths: for path in paths:
obj = bus.get_object('org.freedesktop.Hal', path) obj = bus.get_object('org.freedesktop.Hal', path)
objif = dbus.Interface(obj, 'org.freedesktop.Hal.Device') objif = dbus.Interface(obj, 'org.freedesktop.Hal.Device')
devif = objif
parentdriver = None parentdriver = None
while parentdriver != 'umass': while parentdriver != 'umass':
try: try:

View File

@ -718,7 +718,7 @@ class Device(DeviceConfig, DevicePlugin):
d.serial == objif.GetProperty('usb.serial'): d.serial == objif.GetProperty('usb.serial'):
dpaths = manager.FindDeviceStringMatch('storage.originating_device', path) dpaths = manager.FindDeviceStringMatch('storage.originating_device', path)
for dpath in dpaths: for dpath in dpaths:
devif = dbus.Interface(bus.get_object('org.freedesktop.Hal', dpath), 'org.freedesktop.Hal.Device') #devif = dbus.Interface(bus.get_object('org.freedesktop.Hal', dpath), 'org.freedesktop.Hal.Device')
try: try:
vpaths = manager.FindDeviceStringMatch('block.storage_device', dpath) vpaths = manager.FindDeviceStringMatch('block.storage_device', dpath)
for vpath in vpaths: for vpath in vpaths:
@ -763,8 +763,6 @@ class Device(DeviceConfig, DevicePlugin):
if vol['dev'].GetProperty('volume.is_mounted'): if vol['dev'].GetProperty('volume.is_mounted'):
mp = vol['dev'].GetProperty('volume.mount_point') mp = vol['dev'].GetProperty('volume.mount_point')
else: else:
if verbose:
print "FBSD: trying ", vol['label'], "on", 'Calibre-'+labels[i]
try: try:
vol['vol'].Mount('Calibre-'+vol['label'], vol['vol'].Mount('Calibre-'+vol['label'],
vol['dev'].GetProperty('volume.fstype'), []) vol['dev'].GetProperty('volume.fstype'), [])