This commit is contained in:
Kovid Goyal 2021-03-15 20:51:24 +05:30
commit 32f2742e42
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -352,7 +352,7 @@ class DeviceManager(Thread): # {{{
self.connected_device.eject() self.connected_device.eject()
if self.connected_device_kind != 'unmanaged-device': if self.connected_device_kind != 'unmanaged-device':
self.ejected_devices.add(self.connected_device) self.ejected_devices.add(self.connected_device)
self.connected_slot(False, self.connected_device_kind) self.connected_slot(False, None)
elif hasattr(self.connected_device, 'unmount_device'): elif hasattr(self.connected_device, 'unmount_device'):
# As we are on the wrong thread, this call must *not* do # As we are on the wrong thread, this call must *not* do
# anything besides set a flag that the right thread will see. # anything besides set a flag that the right thread will see.
@ -508,7 +508,7 @@ class DeviceManager(Thread): # {{{
self._device_information['info'] = tuple(info) self._device_information['info'] = tuple(info)
def get_current_device_information(self): def get_current_device_information(self):
return self._device_information return self._device_information if self.is_device_present else None
def _books(self): def _books(self):
'''Get metadata from device''' '''Get metadata from device'''