mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
fix some unicode errors
This commit is contained in:
parent
9e71f7ae31
commit
0b7ebe59bb
2 changed files with 3 additions and 2 deletions
|
@ -181,6 +181,7 @@ class AddonDownloader(QThread):
|
|||
def __init__(self, code):
|
||||
QThread.__init__(self)
|
||||
self.code = code
|
||||
self.error = None
|
||||
|
||||
def run(self):
|
||||
# setup progress handler
|
||||
|
@ -200,7 +201,7 @@ class AddonDownloader(QThread):
|
|||
resp, cont = con.request(
|
||||
aqt.appShared + "download/%d" % self.code)
|
||||
except Exception, e:
|
||||
self.error = unicode(e)
|
||||
self.error = unicode(e, "utf8", "replace")
|
||||
return
|
||||
finally:
|
||||
remHook("httpRecv", recvEvent)
|
||||
|
|
|
@ -122,7 +122,7 @@ Please upgrade to the latest version of Anki.""")
|
|||
elif "502" in err or "503" in err or "504" in err:
|
||||
return _("""\
|
||||
AnkiWeb is too busy at the moment. Please try again in a few minutes.""")
|
||||
return err
|
||||
return unicode(err, "utf8", "replace")
|
||||
|
||||
def _getUserPass(self):
|
||||
d = QDialog(self.mw)
|
||||
|
|
Loading…
Reference in a new issue