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.
|
||||
- `: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
|
||||
------
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user