Skip to content

Commit

Permalink
advance the docstrings further
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed May 12, 2018
1 parent b1119a5 commit 8ff8f63
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/python/pants/binaries/binary_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ def _default_http_fetcher(cls):
return Fetcher(get_buildroot())

def __init__(self, bootstrap_dir, timeout_secs, fetcher=None, ignore_cached_download=False):
"""
:param str bootstrap_dir: The root directory where Pants downloads binaries to.
:param int timeout_secs: The number of seconds to wait before timing out on a request for some
url.
:param fetcher: object to fetch urls with, overridden in testing.
:type fetcher: :class:`pants.net.http.fetcher.Fetcher`
:param bool ignore_cached_download: whether to fetch a binary even if it already exists on disk.
"""
self._bootstrap_dir = bootstrap_dir
self._timeout_secs = timeout_secs
self._fetcher = fetcher or self._default_http_fetcher()
Expand All @@ -180,7 +188,8 @@ def _select_binary_stream(self, name, urls):
"""Download a file from a list of urls, yielding a stream after downloading the file.
URLs are tried in order until they succeed.
:raises: :class:`BinaryToolFetcher.BinaryNotFound`
:raises: :class:`BinaryToolFetcher.BinaryNotFound` if requests to all the given urls fail.
"""
downloaded_successfully = False
accumulated_errors = []
Expand Down

0 comments on commit 8ff8f63

Please sign in to comment.