mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:Handle non ascii device error messages better
This commit is contained in:
parent
f179a74a07
commit
d3366d969d
@ -1355,10 +1355,13 @@ class Main(MainWindow, Ui_MainWindow):
|
||||
'''
|
||||
Handle exceptions in threaded device jobs.
|
||||
'''
|
||||
if 'Could not read 32 bytes on the control bus.' in str(job.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
|
||||
try:
|
||||
if 'Could not read 32 bytes on the control bus.' in unicode(job.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
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
print >>sys.stderr, job.console_text()
|
||||
except:
|
||||
|
Loading…
x
Reference in New Issue
Block a user