mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Nicer error message if the progress_indicator plugin fails to load
This commit is contained in:
parent
dc4c444a71
commit
651344027c
@ -823,7 +823,9 @@ class Application(QApplication):
|
|||||||
args.extend(['-platformpluginpath', sys.extensions_location, '-platform', 'headless'])
|
args.extend(['-platformpluginpath', sys.extensions_location, '-platform', 'headless'])
|
||||||
self.headless = headless
|
self.headless = headless
|
||||||
qargs = [i.encode('utf-8') if isinstance(i, unicode_type) else i for i in args]
|
qargs = [i.encode('utf-8') if isinstance(i, unicode_type) else i for i in args]
|
||||||
self.pi = plugins['progress_indicator'][0]
|
self.pi, pi_err = plugins['progress_indicator']
|
||||||
|
if pi_err:
|
||||||
|
raise RuntimeError('Failed to load the progress_indicator C extension, with error: {}'.format(pi_err))
|
||||||
if not isosx and not headless:
|
if not isosx and not headless:
|
||||||
# On OS X high dpi scaling is turned on automatically by the OS, so we dont need to set it explicitly
|
# On OS X high dpi scaling is turned on automatically by the OS, so we dont need to set it explicitly
|
||||||
setup_hidpi()
|
setup_hidpi()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user