mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
e[0] in exception may be int
This commit is contained in:
parent
f1aac15f9e
commit
9926fbcdc5
1 changed files with 4 additions and 1 deletions
|
@ -261,7 +261,10 @@ class SyncThread(QThread):
|
||||||
try:
|
try:
|
||||||
ret = self.client.sync()
|
ret = self.client.sync()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
if isinstance(e[0], str):
|
||||||
err = unicode(e[0], "utf8", "ignore")
|
err = unicode(e[0], "utf8", "ignore")
|
||||||
|
else:
|
||||||
|
err = ""
|
||||||
if "Unable to find the server" in err:
|
if "Unable to find the server" in err:
|
||||||
self.fireEvent("offline")
|
self.fireEvent("offline")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue