def _drive_changed(self, volume_monitor, drive): if drive is None: # can happen when a CD is inserted return try: info = self._get_device_info(drive) except KeyError: return devices.device_changed(info)
def _device_changed(self, device): try: info = self._get_device_info(device) except KeyError: return devices.device_changed(info)