mirror of
https://github.com/ankitects/anki.git
synced 2025-11-08 21:57:12 -05:00
make sure to catch unknown errors during sync
This commit is contained in:
parent
e6a3df771a
commit
88cf743c8a
1 changed files with 5 additions and 2 deletions
|
|
@ -258,9 +258,12 @@ class SyncThread(QThread):
|
||||||
try:
|
try:
|
||||||
ret = self.client.sync()
|
ret = self.client.sync()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
if "Unable to find the server" in unicode(e):
|
err = unicode(e)
|
||||||
|
if "Unable to find the server" in err:
|
||||||
self.fireEvent("offline")
|
self.fireEvent("offline")
|
||||||
return
|
else:
|
||||||
|
self.fireEvent("error", err)
|
||||||
|
return
|
||||||
if ret == "badAuth":
|
if ret == "badAuth":
|
||||||
return self.fireEvent("badAuth")
|
return self.fireEvent("badAuth")
|
||||||
elif ret == "clockOff":
|
elif ret == "clockOff":
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue