From 4116ab65b0a15f4b6c8423d3007f1d1b1730b125 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 26 Feb 2019 09:36:20 +1000 Subject: [PATCH] improve add-on downloading error readability --- aqt/downloader.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/aqt/downloader.py b/aqt/downloader.py index 34b3c5537..db3dc9d32 100644 --- a/aqt/downloader.py +++ b/aqt/downloader.py @@ -60,14 +60,10 @@ class Downloader(QThread): self.error = _("Invalid code, or add-on not available for your version of Anki.") return else: - self.error = _("Error downloading: %s" % resp.status_code) + self.error = _("Unexpected response code: %s" % resp.status_code) return except Exception as e: - exc = traceback.format_exc() - try: - self.error = str(e[0]) - except: - self.error = str(exc) + self.error = _("Please check your internet connection.") + "\n\n" + str(e) return finally: remHook("httpRecv", recvEvent)