mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 09:16:38 -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):
|
def __init__(self, code):
|
||||||
QThread.__init__(self)
|
QThread.__init__(self)
|
||||||
self.code = code
|
self.code = code
|
||||||
|
self.error = None
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
# setup progress handler
|
# setup progress handler
|
||||||
|
@ -200,7 +201,7 @@ class AddonDownloader(QThread):
|
||||||
resp, cont = con.request(
|
resp, cont = con.request(
|
||||||
aqt.appShared + "download/%d" % self.code)
|
aqt.appShared + "download/%d" % self.code)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
self.error = unicode(e)
|
self.error = unicode(e, "utf8", "replace")
|
||||||
return
|
return
|
||||||
finally:
|
finally:
|
||||||
remHook("httpRecv", recvEvent)
|
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:
|
elif "502" in err or "503" in err or "504" in err:
|
||||||
return _("""\
|
return _("""\
|
||||||
AnkiWeb is too busy at the moment. Please try again in a few minutes.""")
|
AnkiWeb is too busy at the moment. Please try again in a few minutes.""")
|
||||||
return err
|
return unicode(err, "utf8", "replace")
|
||||||
|
|
||||||
def _getUserPass(self):
|
def _getUserPass(self):
|
||||||
d = QDialog(self.mw)
|
d = QDialog(self.mw)
|
||||||
|
|
Loading…
Reference in a new issue