diff --git a/volumestoolbar.py b/volumestoolbar.py index fdd6845..ca877b1 100644 --- a/volumestoolbar.py +++ b/volumestoolbar.py @@ -117,6 +117,14 @@ class VolumesToolbar(gtk.Toolbar): if device.GetProperty('volume.mount_point') == '/': return + storage_udi = device.GetProperty('block.storage_device') + obj = bus.get_object(HAL_SERVICE_NAME, storage_udi) + storage_device = dbus.Interface(obj, HAL_DEVICE_IFACE) + + # Ignore not removable storage. + if not storage_device.GetProperty('storage.removable'): + return + logging.debug('VolumeToolbar._mount_hal_device: %r' % udi) # listen to mount/unmount