diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-10-09 15:18:30 +0100 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-04 12:40:54 +0000 |
commit | 6df7e8d162443cfd93c17eb2c8fce59337560989 (patch) | |
tree | 2b9481fff3ce0ac233afe8df4cdd2a6e823c2b75 | |
parent | 37fa980b17dd6e95cf614d5c06600ece25429a87 (diff) | |
download | import-6df7e8d162443cfd93c17eb2c8fce59337560989.tar.gz |
Rename some things
-rwxr-xr-x | import/pip.to_lorry | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/import/pip.to_lorry b/import/pip.to_lorry index 9be1e9a..e80e819 100755 --- a/import/pip.to_lorry +++ b/import/pip.to_lorry @@ -112,7 +112,7 @@ def filter_urls(urls): return filter(allowed_extension, urls) -def generate_lorry_from_tarball(package_name): +def str_tarball_lorry(package_name): client = xmlrpclib.ServerProxy(PYPI_URL) releases = client.package_releases(package_name) @@ -150,7 +150,7 @@ def generate_lorry_from_tarball(package_name): return make_tarball_lorry(package_name, url) -def str_lorry_from_repo(package_name, repo_type, url): +def str_repo_lorry(package_name, repo_type, url): return "%s: %s" % (package_name, json.dumps({'type': repo_type, 'url': url}, indent=4, sort_keys=True)) @@ -164,5 +164,5 @@ info = metadata['info'] repo_type = find_repo_type(info['home_page']) if 'home_page' in info else None -print(str_lorry_from_repo(package_name, repo_type, info['home_page']) - if repo_type else generate_lorry_from_tarball(package_name)) +print(str_repo_lorry(package_name, repo_type, info['home_page']) + if repo_type else str_tarball_lorry(package_name)) |