Don't try to set fileobject on errors.

This commit is contained in:
Florian Bruhin 2014-11-15 20:06:49 +01:00
parent c6deae36b1
commit 406f7b3b84

View File

@ -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.