mirror of
https://github.com/ankitects/anki.git
synced 2025-11-26 06:27:12 -05:00
fix Windows packages failing to start
This commit is contained in:
parent
1470b3683b
commit
3019d0dfdf
1 changed files with 6 additions and 2 deletions
|
|
@ -26,8 +26,12 @@ assert anki.buildinfo.buildhash == aqt.buildinfo.buildhash
|
||||||
|
|
||||||
# we want to be able to print unicode debug info to console without
|
# we want to be able to print unicode debug info to console without
|
||||||
# fear of a traceback on systems with the console set to ASCII
|
# fear of a traceback on systems with the console set to ASCII
|
||||||
|
try:
|
||||||
sys.stdout.reconfigure(encoding="utf-8") # type: ignore
|
sys.stdout.reconfigure(encoding="utf-8") # type: ignore
|
||||||
sys.stderr.reconfigure(encoding="utf-8") # type: ignore
|
sys.stderr.reconfigure(encoding="utf-8") # type: ignore
|
||||||
|
except AttributeError:
|
||||||
|
# on Windows without console, NullWriter doesn't support this
|
||||||
|
pass
|
||||||
|
|
||||||
appVersion = _version
|
appVersion = _version
|
||||||
appWebsite = "https://apps.ankiweb.net/"
|
appWebsite = "https://apps.ankiweb.net/"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue