Make driver more robust against device removals

This commit is contained in:
Kovid Goyal 2007-10-24 19:46:33 +00:00
parent 69769c9d92
commit 3bab0df747

View File

@ -163,7 +163,7 @@ class PRS505(Device):
fstype = mmo.GetPropertyString('volume.fstype', dbus_interface='org.freedesktop.Hal.Device') fstype = mmo.GetPropertyString('volume.fstype', dbus_interface='org.freedesktop.Hal.Device')
if is_mounted: if is_mounted:
return str(mount_point) return str(mount_point)
mmo.Mount(label, fstype, ['umask=077', 'uid='+str(os.getuid())],# 'gid='+str(os.getgid())], mmo.Mount(label, fstype, ['umask=077', 'uid='+str(os.getuid()), 'sync'],
dbus_interface='org.freedesktop.Hal.Device.Volume') dbus_interface='org.freedesktop.Hal.Device.Volume')
return os.path.normpath('/media/'+label)+'/' return os.path.normpath('/media/'+label)+'/'