Hold file in intermediate variable in unpack_url
@@ -285,11 +285,11 @@ def unpack_url(
# file urls
if link.is_file:
- return unpack_file_url(link, location, download_dir, hashes=hashes)
+ file = unpack_file_url(link, location, download_dir, hashes=hashes)
# http urls
else:
- return unpack_http_url(
+ file = unpack_http_url(
link,
location,
downloader,
@@ -297,6 +297,8 @@ def unpack_url(
hashes=hashes,
)
+ return file
+
def _download_http_url(
link, # type: Link
