Don't nest function calls in on_read_timer_timeout.
This would have made it easier to diagnose #307.
This commit is contained in:
parent
edfc0e24b2
commit
07fed5a401
@ -440,7 +440,8 @@ class DownloadItem(QObject):
|
|||||||
"""Read some bytes from the QNetworkReply periodically."""
|
"""Read some bytes from the QNetworkReply periodically."""
|
||||||
if not self.reply.isOpen():
|
if not self.reply.isOpen():
|
||||||
raise IOError("Reply is closed!")
|
raise IOError("Reply is closed!")
|
||||||
self._buffer.write(self.reply.read(1024))
|
data = self.reply.read(1024)
|
||||||
|
self._buffer.write(data)
|
||||||
|
|
||||||
def _handle_redirect(self):
|
def _handle_redirect(self):
|
||||||
"""Handle a HTTP redirect.
|
"""Handle a HTTP redirect.
|
||||||
|
Loading…
Reference in New Issue
Block a user