Handle OSError when closing download fileobj

This commit is contained in:
Florian Bruhin 2016-07-03 18:26:01 +02:00
parent d1f6ae99b5
commit e3c6a0b766
2 changed files with 9 additions and 1 deletions

View File

@ -31,6 +31,11 @@ Changed
- 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.
Fixed
-----
- Fix crash when downloading with a full disk
Removed
------

View File

@ -413,7 +413,10 @@ class DownloadItem(QObject):
self.done = True
self.data_changed.emit()
if self.fileobj is not None:
self.fileobj.close()
try:
self.fileobj.close()
except OSError:
log.downloads.exception("Error while closing file object")
def init_reply(self, reply):
"""Set a new reply and connect its signals.