mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
exception[0] may not be a string
This commit is contained in:
parent
9e50b14651
commit
723fb1ee2e
1 changed files with 5 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
import time, re
|
import time, re, traceback
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
from anki.sync import httpCon
|
from anki.sync import httpCon
|
||||||
from aqt.utils import showWarning
|
from aqt.utils import showWarning
|
||||||
|
@ -59,7 +59,10 @@ class Downloader(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[0], "utf8", "ignore")
|
try:
|
||||||
|
self.error = unicode(e[0], "utf8", "ignore")
|
||||||
|
except:
|
||||||
|
self.error = traceback.format_exc()
|
||||||
return
|
return
|
||||||
finally:
|
finally:
|
||||||
remHook("httpRecv", recvEvent)
|
remHook("httpRecv", recvEvent)
|
||||||
|
|
Loading…
Reference in a new issue