From 0a1658de249053e636be8e2df2a1ccb45b2ff695 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 23 Apr 2009 02:08:12 +0900 Subject: [PATCH] improve sync error message --- ankiqt/ui/sync.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ankiqt/ui/sync.py b/ankiqt/ui/sync.py index 6ff62a644..45979e105 100644 --- a/ankiqt/ui/sync.py +++ b/ankiqt/ui/sync.py @@ -49,12 +49,11 @@ class Sync(QThread): msg=_("Please double-check your username/password.") elif error.data.get('status') == "oldVersion": msg=_("The sync protocol has changed. Please upgrade.") - else: + elif error.data.get('type') == 'noResponse': msg=_("""\ -Syncing failed. Please try again in a few minutes. -If the problem persists, please report it on the forum. - -Error: %s""" % `getattr(error, 'data')`) +Couldn't contact Anki Online. Please check your internet connection.""") + else: + msg=_("Unknown error: %s" % `getattr(error, 'data')`) return msg def connect(self, *args):