aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-12-08 19:14:04 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-12-08 19:14:04 -0500
commit95ac77a928a08c836c6f4ccc066a797357207abc (patch)
tree0a672eead610b48616a7ff835f9da1eb3efd89ec /setuptools/package_index.py
parent5a662289e866fb9bac77736ffede2fca05c79367 (diff)
downloadexternal_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-xsetuptools/package_index.py5
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"