diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-08 19:14:04 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-08 19:14:04 -0500 |
commit | 95ac77a928a08c836c6f4ccc066a797357207abc (patch) | |
tree | 0a672eead610b48616a7ff835f9da1eb3efd89ec /setuptools/package_index.py | |
parent | 5a662289e866fb9bac77736ffede2fca05c79367 (diff) | |
download | external_python_setuptools-95ac77a928a08c836c6f4ccc066a797357207abc.tar.gz external_python_setuptools-95ac77a928a08c836c6f4ccc066a797357207abc.tar.bz2 external_python_setuptools-95ac77a928a08c836c6f4ccc066a797357207abc.zip |
Use new string formatting here as well
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-x | setuptools/package_index.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 1c156f07..525cb645 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -1040,8 +1040,9 @@ def local_open(url): f += '/' files.append('<a href="{name}">{name}</a>'.format(name=f)) else: - body = ("<html><head><title>%s</title>" % url) + \ - "</head><body>%s</body></html>" % '\n'.join(files) + tmpl = ("<html><head><title>{url}</title>" + "</head><body>{files}</body></html>") + body = tmpl.format(url=url, files='\n'.join(files)) status, message = 200, "OK" else: status, message, body = 404, "Path not found", "Not found" |