Don't try to set fileobject on errors.
This commit is contained in:
parent
c6deae36b1
commit
406f7b3b84
@ -260,7 +260,8 @@ class DownloadItem(QObject):
|
||||
fileobj = open(self._filename, 'wb')
|
||||
except OSError as e:
|
||||
self._die(e.strerror)
|
||||
self.set_fileobj(fileobj)
|
||||
else:
|
||||
self.set_fileobj(fileobj)
|
||||
|
||||
def set_fileobj(self, fileobj):
|
||||
""""Set the file object to write the download to.
|
||||
|
Loading…
Reference in New Issue
Block a user