mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 20:57:13 -05:00
catch more errors
This commit is contained in:
parent
705e809175
commit
238a9a823c
1 changed files with 9 additions and 4 deletions
13
aqt/sync.py
13
aqt/sync.py
|
|
@ -72,7 +72,7 @@ class SyncManager(QObject):
|
||||||
m = _("Downloading from AnkiWeb...")
|
m = _("Downloading from AnkiWeb...")
|
||||||
elif t == "sanity":
|
elif t == "sanity":
|
||||||
m = _("Checking...")
|
m = _("Checking...")
|
||||||
elif t == "findChanges":
|
elif t == "findMedia":
|
||||||
m = _("Syncing Media...")
|
m = _("Syncing Media...")
|
||||||
if m:
|
if m:
|
||||||
print m
|
print m
|
||||||
|
|
@ -94,11 +94,16 @@ Couldn't connect to AnkiWeb. Please check your network connection \
|
||||||
and try again.""")
|
and try again.""")
|
||||||
elif "timed out" in err:
|
elif "timed out" in err:
|
||||||
return _("""\
|
return _("""\
|
||||||
The connection with the server timed out. Please check your network \
|
The connection to AnkiWeb timed out. Please check your network \
|
||||||
connection and try again.""")
|
connection and try again.""")
|
||||||
elif "502" in err:
|
elif "501" in err:
|
||||||
return _("""\
|
return _("""\
|
||||||
AnkiWeb appears to be down. Please try again in a few minutes.""")
|
Please upgrade to the latest version of Anki.""")
|
||||||
|
# 502 is technically due to the server restarting, but we reuse the
|
||||||
|
# error message
|
||||||
|
elif "502" in err or "503" in err or "504" in err:
|
||||||
|
return _("""\
|
||||||
|
AnkiWeb is too busy at the moment. Please try again in a few minutes.""")
|
||||||
return err
|
return err
|
||||||
|
|
||||||
def _getUserPass(self):
|
def _getUserPass(self):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue