downloads: close fileobject in DownloadItem._die
Otherwise we will get a unclosed resource warning.
This commit is contained in:
parent
dcac832f5e
commit
2918c5cd57
@ -412,6 +412,8 @@ class DownloadItem(QObject):
|
|||||||
self.reply = None
|
self.reply = None
|
||||||
self.done = True
|
self.done = True
|
||||||
self.data_changed.emit()
|
self.data_changed.emit()
|
||||||
|
if self.fileobj is not None:
|
||||||
|
self.fileobj.close()
|
||||||
|
|
||||||
def init_reply(self, reply):
|
def init_reply(self, reply):
|
||||||
"""Set a new reply and connect its signals.
|
"""Set a new reply and connect its signals.
|
||||||
|
Loading…
Reference in New Issue
Block a user