mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Give a useful error message for temporary bus errors.
This commit is contained in:
parent
a330a3f47f
commit
23cdd84f90
@ -644,8 +644,12 @@ class Main(MainWindow, Ui_MainWindow):
|
||||
|
||||
def device_job_exception(self, id, description, exception, formatted_traceback):
|
||||
'''
|
||||
Handle exceptions in threaded jobs.
|
||||
Handle exceptions in threaded device jobs.
|
||||
'''
|
||||
if 'Could not read 32 bytes on the control bus.' in str(exception):
|
||||
error_dialog(self, 'Error talking to device',
|
||||
'There was a temporary error talking to the device. Please unplug and reconnect the device and or reboot.').show()
|
||||
return
|
||||
print >>sys.stderr, 'Error in job:', description.encode('utf8')
|
||||
print >>sys.stderr, exception
|
||||
print >>sys.stderr, formatted_traceback.encode('utf8')
|
||||
|
Loading…
x
Reference in New Issue
Block a user