Handle data being None in download read timer.

Fixes #307.
This commit is contained in:
Florian Bruhin 2014-12-18 23:09:33 +01:00
parent 5c15f56213
commit 07957b105d

View File

@ -477,7 +477,8 @@ class DownloadItem(QObject):
if not self.reply.isOpen():
raise OSError("Reply is closed!")
data = self.reply.read(1024)
self._buffer.write(data)
if data is not None:
self._buffer.write(data)
def _handle_redirect(self):
"""Handle a HTTP redirect.