mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
Set to javaScriptConsoleMessage output to stdout because it
may raise error messages on the anki GUI.
This commit is contained in:
parent
f3c561b6d9
commit
7061aac16d
1 changed files with 5 additions and 3 deletions
|
@ -81,10 +81,12 @@ class AnkiWebPage(QWebEnginePage): # type: ignore
|
|||
t=level, a=line, f=srcID, b=msg + "\n"
|
||||
)
|
||||
# ensure we don't try to write characters the terminal can't handle
|
||||
buf = buf.encode(sys.stderr.encoding, "backslashreplace").decode(
|
||||
sys.stderr.encoding
|
||||
buf = buf.encode(sys.stdout.encoding, "backslashreplace").decode(
|
||||
sys.stdout.encoding
|
||||
)
|
||||
sys.stderr.write(buf)
|
||||
# output to stdout because it may raise error messages on the anki GUI
|
||||
# https://github.com/ankitects/anki/pull/560
|
||||
sys.stdout.write(buf)
|
||||
|
||||
def acceptNavigationRequest(self, url, navType, isMainFrame):
|
||||
if not isMainFrame:
|
||||
|
|
Loading…
Reference in a new issue