mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Force a few error messages to unicode
This commit is contained in:
parent
36288d8343
commit
ea7637bf60
@ -158,7 +158,7 @@ class Saver(QObject):
|
|||||||
except Failure as err:
|
except Failure as err:
|
||||||
error_dialog(self.pd, _('Critical failure'), _(
|
error_dialog(self.pd, _('Critical failure'), _(
|
||||||
'Could not save books to disk, click "Show details" for more information'),
|
'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.pd.canceled = True
|
||||||
self.do_one_signal.emit()
|
self.do_one_signal.emit()
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ from math import ceil
|
|||||||
from multiprocessing.connection import Listener, arbitrary_address
|
from multiprocessing.connection import Listener, arbitrary_address
|
||||||
from threading import RLock, Thread
|
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.constants import DEBUG, islinux, iswindows, ispy3
|
||||||
from calibre.ptempfile import base_dir
|
from calibre.ptempfile import base_dir
|
||||||
from calibre.utils.ipc import eintr_retry_call
|
from calibre.utils.ipc import eintr_retry_call
|
||||||
@ -228,7 +228,7 @@ class Server(Thread):
|
|||||||
}
|
}
|
||||||
cw = self.do_launch(env, gui, redirect_output, rfile, job_name=job_name)
|
cw = self.do_launch(env, gui, redirect_output, rfile, job_name=job_name)
|
||||||
if isinstance(cw, string_or_bytes):
|
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:
|
if DEBUG:
|
||||||
print('Worker Launch took:', time.time() - start)
|
print('Worker Launch took:', time.time() - start)
|
||||||
return cw
|
return cw
|
||||||
|
Loading…
x
Reference in New Issue
Block a user