mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
reduce chunk size in getshared, don't die when reporting error w/ foreign chars
This commit is contained in:
parent
5458bc8577
commit
84914fabb9
1 changed files with 2 additions and 2 deletions
|
|
@ -163,7 +163,7 @@ class GetShared(QDialog):
|
|||
"http://anki.ichi2.net/file/get?id=%d" %
|
||||
self.curRow[R_ID])
|
||||
while 1:
|
||||
data = sock.read(65536)
|
||||
data = sock.read(32768)
|
||||
if not data:
|
||||
break
|
||||
cnt += len(data)
|
||||
|
|
@ -172,7 +172,7 @@ class GetShared(QDialog):
|
|||
label=_("Downloaded %dKB") % (cnt/1024.0))
|
||||
except:
|
||||
showInfo(_("Unable to connect to server.\n\n") +
|
||||
traceback.format_exc())
|
||||
unicode(traceback.format_exc(), "utf-8", "replace"))
|
||||
self.close()
|
||||
return
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Reference in a new issue