Skip to content

Commit

Permalink
adding md5 checking option to high level function
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.enthought.com/svn/enthought/Enstaller/trunk@24139 651a555e-23ca-0310-84fe-ca9f7c59d2ea
  • Loading branch information
ischnell committed Jul 14, 2009
1 parent d0de7bd commit 5f909ac
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions enstaller/indexed_repo/__init__.py
Expand Up @@ -16,7 +16,7 @@


def resolve(req_string, local=None, repos=[], recur=True, fetch=False,
fetch_force=False, verbose=False):
fetch_force=False, verbose=False, check_md5=False):
"""
Resolves a requirement in a chain of indexed repositories. An optional
local repository, which is not indexed, can be specified. This local
Expand Down Expand Up @@ -53,6 +53,14 @@ def resolve(req_string, local=None, repos=[], recur=True, fetch=False,
fetch_force:
allow force when fetching
check_md5:
when determining if a file needs to be downloaded or copied, check
it's md5. This is, of course, slower but more reliable then just
checking the file-size, which always done.
Note that option has option has nothing to do with checking the
md5 of a download. The md5 is always checked when files are
downloaded (regardless of this option).
"""
req = Req(req_string)

Expand Down Expand Up @@ -84,7 +92,7 @@ def resolve(req_string, local=None, repos=[], recur=True, fetch=False,
if verbose:
print 70 * '='
print 'fetching: %r' % dist
c.fetch_dist(dist, force=fetch_force)
c.fetch_dist(dist, force=fetch_force, check_md5=check_md5)

return dists

Expand Down

0 comments on commit 5f909ac

Please sign in to comment.