diff options
Diffstat (limited to 'baserockimport/exts/python.to_lorry')
-rwxr-xr-x | baserockimport/exts/python.to_lorry | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/baserockimport/exts/python.to_lorry b/baserockimport/exts/python.to_lorry index accc9dc..f54e341 100755 --- a/baserockimport/exts/python.to_lorry +++ b/baserockimport/exts/python.to_lorry @@ -187,17 +187,17 @@ def str_repo_lorry(package_name, repo_type, url): return json.dumps({name: {'type': repo_type, 'url': url}}, indent=4, sort_keys=True) -def main(): - if len(sys.argv) != 2: +def main(argv): + if len(argv) != 2: # TODO explain the format of python requirements # warn the user that they probably want to quote their arg # > < will be interpreted as redirection by the shell - print('usage: %s requirement' % sys.argv[0], file=sys.stderr) + print('usage: %s requirement' % argv[0], file=sys.stderr) sys.exit(1) client = xmlrpclib.ServerProxy(PYPI_URL) - req = pkg_resources.parse_requirements(sys.argv[1]).next() + req = pkg_resources.parse_requirements(argv[1]).next() new_proj_name = name_or_closest(client, req.project_name) |