Skip to content

Commit d833d0d

Browse files
committed
Adds new filename parameter to tools.get()
1 parent 4b250d8 commit d833d0d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎changelog.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Check https://github.com/conan-io/conan for issues and more details about develo
1717
- Feature: The ``json`` generator now outputs the settings and options
1818
- Feature: ``conan remote list --raw`` prints remote info in a format valid for *remotes.txt*, so it can be used for ``conan config install``
1919
- Feature: Visual Studio generator creates *conanbuildinfo.props* file using ``$(USERPROFILE)`` macro.
20+
- Feature: Added ``filename`` parameter to ``tools.get()`` in case it cannot be deduced from URL.
2021

2122
1.5.2 (5-July-2018)
2223
--------------------

‎reference/tools.rst‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ tools.get()
283283

284284
.. code-block:: python
285285
286-
def get(url, md5="", sha1="", sha256="")
286+
def get(url, filenname="", md5="", sha1="", sha256="")
287287
288288
Just a high level wrapper for download, unzip, and remove the temporary zip file once unzipped.
289289
You can pass hash checking parameters: ``md5``, ``sha1``, ``sha256``. All the specified algorithms
@@ -298,7 +298,8 @@ will be checked, if any of them doesn't match, it will raise a ``ConanException`
298298
tools.get("http://url/file", destination="subfolder")
299299
300300
Parameters:
301-
- **url** (Required): URL to download
301+
- **url** (Required): URL to download.
302+
- **filename** (Optional, Defaulted to ```""``): Specify the name of the compressed file if it cannot be deduced from URL.
302303
- **md5** (Optional, Defaulted to ``""``): MD5 hash code to check the downloaded file.
303304
- **sha1** (Optional, Defaulted to ``""``): SHA1 hash code to check the downloaded file.
304305
- **sha256** (Optional, Defaulted to ``""``): SHA256 hash code to check the downloaded file.

0 commit comments

Comments
 (0)