diff options
Diffstat (limited to 'qutebrowser/browser/qtnetworkdownloads.py')
-rw-r--r-- | qutebrowser/browser/qtnetworkdownloads.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qutebrowser/browser/qtnetworkdownloads.py b/qutebrowser/browser/qtnetworkdownloads.py index f048d293d..8adb7ea20 100644 --- a/qutebrowser/browser/qtnetworkdownloads.py +++ b/qutebrowser/browser/qtnetworkdownloads.py @@ -110,6 +110,7 @@ class DownloadItem(downloads.AbstractDownloadItem): """Create a file object using the internal filename.""" assert self._filename is not None try: + # pylint: disable=consider-using-with fileobj = open(self._filename, 'wb') except OSError as e: self._die(e.strerror) @@ -502,6 +503,7 @@ class DownloadManager(downloads.AbstractDownloadManager): Args: request: The QNetworkRequest to download. target: Where to save the download as downloads.DownloadTarget. + suggested_fn: The filename to use for the file. **kwargs: Passed to _fetch_request. Return: @@ -546,6 +548,9 @@ class DownloadManager(downloads.AbstractDownloadManager): target: Where to save the download as downloads.DownloadTarget. auto_remove: Whether to remove the download even if downloads.remove_finished is set to -1. + suggested_filename: The filename to use for the file. + prompt_download_directory: Whether to prompt for a location to + download the file to. Return: The created DownloadItem. |