mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
2291b2d2a0
commit
494d5dd92c
@ -1282,10 +1282,11 @@ def ensure_app(headless=True):
|
|||||||
with _ea_lock:
|
with _ea_lock:
|
||||||
if _store_app is None and QApplication.instance() is None:
|
if _store_app is None and QApplication.instance() is None:
|
||||||
args = sys.argv[:1]
|
args = sys.argv[:1]
|
||||||
if headless and (islinux or isbsd):
|
has_headless = islinux or isbsd
|
||||||
|
if headless and has_headless:
|
||||||
args += ['-platformpluginpath', sys.extensions_location, '-platform', 'headless']
|
args += ['-platformpluginpath', sys.extensions_location, '-platform', 'headless']
|
||||||
_store_app = QApplication(args)
|
_store_app = QApplication(args)
|
||||||
if headless and (islinux or isbsd):
|
if headless and has_headless:
|
||||||
_store_app.headless = True
|
_store_app.headless = True
|
||||||
import traceback
|
import traceback
|
||||||
# This is needed because as of PyQt 5.4 if sys.execpthook ==
|
# This is needed because as of PyQt 5.4 if sys.execpthook ==
|
||||||
|
Loading…
x
Reference in New Issue
Block a user