mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 09:03:43 +02:00
Force a few error messages to unicode
This commit is contained in:
parent
36288d8343
commit
ea7637bf60
2 changed files with 3 additions and 3 deletions
|
|
@ -158,7 +158,7 @@ def collection_finished(self):
|
|||
except Failure as err:
|
||||
error_dialog(self.pd, _('Critical failure'), _(
|
||||
'Could not save books to disk, click "Show details" for more information'),
|
||||
det_msg=unicode_type(err.failure_message) + '\n' + unicode_type(err.details), show=True)
|
||||
det_msg=force_unicode(err.failure_message) + '\n' + force_unicode(err.details), show=True)
|
||||
self.pd.canceled = True
|
||||
self.do_one_signal.emit()
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
from multiprocessing.connection import Listener, arbitrary_address
|
||||
from threading import RLock, Thread
|
||||
|
||||
from calibre import detect_ncpus as cpu_count
|
||||
from calibre import detect_ncpus as cpu_count, force_unicode
|
||||
from calibre.constants import DEBUG, islinux, iswindows, ispy3
|
||||
from calibre.ptempfile import base_dir
|
||||
from calibre.utils.ipc import eintr_retry_call
|
||||
|
|
@ -228,7 +228,7 @@ def launch_worker(self, gui=False, redirect_output=None, job_name=None):
|
|||
}
|
||||
cw = self.do_launch(env, gui, redirect_output, rfile, job_name=job_name)
|
||||
if isinstance(cw, string_or_bytes):
|
||||
raise CriticalError('Failed to launch worker process:\n'+cw)
|
||||
raise CriticalError('Failed to launch worker process:\n'+force_unicode(cw))
|
||||
if DEBUG:
|
||||
print('Worker Launch took:', time.time() - start)
|
||||
return cw
|
||||
|
|
|
|||
Loading…
Reference in a new issue