From df4aad50e11f35c74dfb5151e1c1614dff2dcb47 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 10 Apr 2019 12:44:01 +1000 Subject: [PATCH] avoid popups for some non-serious warnings --- aqt/main.py | 2 +- aqt/webview.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aqt/main.py b/aqt/main.py index 6fce4509a..86a2ff4f8 100644 --- a/aqt/main.py +++ b/aqt/main.py @@ -292,7 +292,7 @@ close the profile or restart Anki.""")) if getattr(w, "silentlyClose", None): w.close() else: - showWarning("Window should have been closed: {}".format(w)) + print("Window should have been closed: {}".format(w)) def unloadProfileAndExit(self): self.unloadProfile(self.cleanupAndExit) diff --git a/aqt/webview.py b/aqt/webview.py index 4bc5497e6..0fee1f58b 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -75,7 +75,7 @@ class AnkiWebPage(QWebEnginePage): # catch buggy links from aqt import mw if url.matches(QUrl(mw.serverURL()), QUrl.RemoveFragment): - sys.stderr.write("onclick handler needs to return false\n") + print("onclick handler needs to return false") return False # load all other links in browser openLink(url)