mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
GUI deveice detection: Handle case when user yanks connected device before device connection handler is called. Fixes #6864 (Unhandled exception, probably when trying to connect to iTunes/iPad)
This commit is contained in:
parent
89c3e8ad87
commit
7d5da9f48d
@ -707,6 +707,10 @@ class DeviceMixin(object): # {{{
|
|||||||
'''
|
'''
|
||||||
Called when a device is connected to the computer.
|
Called when a device is connected to the computer.
|
||||||
'''
|
'''
|
||||||
|
# This can happen as this function is called in a queued connection and
|
||||||
|
# the user could have yanked the device in the meantime
|
||||||
|
if connected and not self.device_manager.is_device_connected:
|
||||||
|
connected = False
|
||||||
self.set_device_menu_items_state(connected)
|
self.set_device_menu_items_state(connected)
|
||||||
if connected:
|
if connected:
|
||||||
self.device_manager.get_device_information(\
|
self.device_manager.get_device_information(\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user