mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
catch timeout errors; blank key when badAuth received
This commit is contained in:
parent
7916dea182
commit
240f61fd49
1 changed files with 7 additions and 0 deletions
|
@ -56,6 +56,9 @@ class SyncManager(QObject):
|
||||||
tooltip(
|
tooltip(
|
||||||
_("AnkiWeb ID or password was incorrect; please try again."),
|
_("AnkiWeb ID or password was incorrect; please try again."),
|
||||||
parent=self.mw)
|
parent=self.mw)
|
||||||
|
# blank the key so we prompt user again
|
||||||
|
self.pm.profile['syncKey'] = None
|
||||||
|
self.pm.save()
|
||||||
elif evt == "newKey":
|
elif evt == "newKey":
|
||||||
self.pm.profile['syncKey'] = args[0]
|
self.pm.profile['syncKey'] = args[0]
|
||||||
self.pm.save()
|
self.pm.save()
|
||||||
|
@ -87,6 +90,10 @@ class SyncManager(QObject):
|
||||||
return _("""\
|
return _("""\
|
||||||
Couldn't connect to AnkiWeb. Please check your network connection \
|
Couldn't connect to AnkiWeb. Please check your network connection \
|
||||||
and try again.""")
|
and try again.""")
|
||||||
|
elif "timed out" in err:
|
||||||
|
return _("""\
|
||||||
|
The connection with the server timed out. Please check your network \
|
||||||
|
connection and try again.""")
|
||||||
return err
|
return err
|
||||||
|
|
||||||
def _getUserPass(self):
|
def _getUserPass(self):
|
||||||
|
|
Loading…
Reference in a new issue