Skip to content

Commit

Permalink
Nicer error message if the progress_indicator plugin fails to load
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Mar 17, 2019
1 parent dc4c444 commit 6513440
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/calibre/gui2/__init__.py
Expand Up @@ -823,7 +823,9 @@ def __init__(self, args, force_calibre_style=False, override_program_name=None,
args.extend(['-platformpluginpath', sys.extensions_location, '-platform', 'headless'])
self.headless = headless
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:
# On OS X high dpi scaling is turned on automatically by the OS, so we dont need to set it explicitly
setup_hidpi()
Expand Down

0 comments on commit 6513440

Please sign in to comment.