mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -04:00
...
This commit is contained in:
parent
eb98c55bb7
commit
d9cdcca712
@ -19,7 +19,7 @@ from calibre.devices.scanner import DeviceScanner
|
|||||||
from calibre.gui2 import config, error_dialog, Dispatcher, dynamic, \
|
from calibre.gui2 import config, error_dialog, Dispatcher, dynamic, \
|
||||||
warning_dialog, info_dialog, choose_dir
|
warning_dialog, info_dialog, choose_dir
|
||||||
from calibre.ebooks.metadata import authors_to_string
|
from calibre.ebooks.metadata import authors_to_string
|
||||||
from calibre import preferred_encoding, prints, force_unicode
|
from calibre import preferred_encoding, prints, force_unicode, as_unicode
|
||||||
from calibre.utils.filenames import ascii_filename
|
from calibre.utils.filenames import ascii_filename
|
||||||
from calibre.devices.errors import FreeSpaceError
|
from calibre.devices.errors import FreeSpaceError
|
||||||
from calibre.devices.apple.driver import ITUNES_ASYNC
|
from calibre.devices.apple.driver import ITUNES_ASYNC
|
||||||
@ -68,13 +68,7 @@ class DeviceJob(BaseJob): # {{{
|
|||||||
if self._aborted:
|
if self._aborted:
|
||||||
return
|
return
|
||||||
self.failed = True
|
self.failed = True
|
||||||
try:
|
ex = as_unicode(err)
|
||||||
ex = unicode(err)
|
|
||||||
except:
|
|
||||||
try:
|
|
||||||
ex = str(err).decode(preferred_encoding, 'replace')
|
|
||||||
except:
|
|
||||||
ex = repr(err)
|
|
||||||
self._details = ex + '\n\n' + \
|
self._details = ex + '\n\n' + \
|
||||||
traceback.format_exc()
|
traceback.format_exc()
|
||||||
self.exception = err
|
self.exception = err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user