mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -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(
|
||||
_("AnkiWeb ID or password was incorrect; please try again."),
|
||||
parent=self.mw)
|
||||
# blank the key so we prompt user again
|
||||
self.pm.profile['syncKey'] = None
|
||||
self.pm.save()
|
||||
elif evt == "newKey":
|
||||
self.pm.profile['syncKey'] = args[0]
|
||||
self.pm.save()
|
||||
|
@ -87,6 +90,10 @@ class SyncManager(QObject):
|
|||
return _("""\
|
||||
Couldn't connect to AnkiWeb. Please check your network connection \
|
||||
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
|
||||
|
||||
def _getUserPass(self):
|
||||
|
|
Loading…
Reference in a new issue