mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
check for syncserver early in startup, so Qt doesn't get imported
This commit is contained in:
parent
e11cad9bf7
commit
1b72cd65ea
1 changed files with 8 additions and 5 deletions
|
@ -18,6 +18,14 @@ from .package import packaged_build_setup
|
|||
|
||||
packaged_build_setup()
|
||||
|
||||
# syncserver needs to be run before Qt loaded
|
||||
if "--syncserver" in sys.argv:
|
||||
from anki.syncserver import serve
|
||||
|
||||
serve()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
import argparse
|
||||
import builtins
|
||||
import cProfile
|
||||
|
@ -468,11 +476,6 @@ def _run(argv: Optional[list[str]] = None, exec: bool = True) -> Optional[AnkiAp
|
|||
if opts.version:
|
||||
print(f"Anki {appVersion}")
|
||||
return None
|
||||
elif opts.syncserver:
|
||||
from anki.syncserver import serve
|
||||
|
||||
serve()
|
||||
return None
|
||||
|
||||
if PROFILE_CODE:
|
||||
|
||||
|
|
Loading…
Reference in a new issue