mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 15:47:12 -05:00
make sure we always turn error into unicode (#488)
This commit is contained in:
parent
3048a8e137
commit
ce2581269b
1 changed files with 5 additions and 3 deletions
|
|
@ -284,9 +284,11 @@ class SyncThread(QThread):
|
|||
if "Unable to find the server" in err:
|
||||
self.fireEvent("offline")
|
||||
else:
|
||||
if not isinstance(log, unicode):
|
||||
err = unicode(log, "utf8", "replace")
|
||||
self.fireEvent("error", log)
|
||||
if not err:
|
||||
err = log
|
||||
if not isinstance(err, unicode):
|
||||
err = unicode(err, "utf8", "replace")
|
||||
self.fireEvent("error", err)
|
||||
return
|
||||
if ret == "badAuth":
|
||||
return self.fireEvent("badAuth")
|
||||
|
|
|
|||
Loading…
Reference in a new issue