Handle OSError when closing download fileobj
This commit is contained in:
parent
d1f6ae99b5
commit
e3c6a0b766
@ -31,6 +31,11 @@ Changed
|
|||||||
- Aliases can now use `;;` to have an alias which executed multiple commands.
|
- Aliases can now use `;;` to have an alias which executed multiple commands.
|
||||||
- `:edit-url` now does nothing if the URL isn't changed in the spawned editor.
|
- `:edit-url` now does nothing if the URL isn't changed in the spawned editor.
|
||||||
|
|
||||||
|
Fixed
|
||||||
|
-----
|
||||||
|
|
||||||
|
- Fix crash when downloading with a full disk
|
||||||
|
|
||||||
Removed
|
Removed
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -413,7 +413,10 @@ class DownloadItem(QObject):
|
|||||||
self.done = True
|
self.done = True
|
||||||
self.data_changed.emit()
|
self.data_changed.emit()
|
||||||
if self.fileobj is not None:
|
if self.fileobj is not None:
|
||||||
|
try:
|
||||||
self.fileobj.close()
|
self.fileobj.close()
|
||||||
|
except OSError:
|
||||||
|
log.downloads.exception("Error while closing file object")
|
||||||
|
|
||||||
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