Fix #7905 (calibre keeps on trying to connect to the plugged device even error happens)

This commit is contained in:
Kovid Goyal 2010-12-15 09:34:33 -07:00
parent ed4709f9ac
commit 5dacd76a4e

View File

@ -166,7 +166,9 @@ class DeviceManager(Thread): # {{{
report_progress=self.report_progress)
dev.open()
except OpenFeedback, e:
self.open_feedback_msg(dev.get_gui_name(), e.feedback_msg)
if dev not in self.ejected_devices:
self.open_feedback_msg(dev.get_gui_name(), e.feedback_msg)
self.ejected_devices.add(dev)
continue
except:
tb = traceback.format_exc()