Commit 95ac77a9 authored by Jason R. Coombs's avatar Jason R. Coombs

Use new string formatting here as well

parent 5a662289
...@@ -1040,8 +1040,9 @@ def local_open(url): ...@@ -1040,8 +1040,9 @@ def local_open(url):
f += '/' f += '/'
files.append('<a href="{name}">{name}</a>'.format(name=f)) files.append('<a href="{name}">{name}</a>'.format(name=f))
else: else:
body = ("<html><head><title>%s</title>" % url) + \ tmpl = ("<html><head><title>{url}</title>"
"</head><body>%s</body></html>" % '\n'.join(files) "</head><body>{files}</body></html>")
body = tmpl.format(url=url, files='\n'.join(files))
status, message = 200, "OK" status, message = 200, "OK"
else: else:
status, message, body = 404, "Path not found", "Not found" status, message, body = 404, "Path not found", "Not found"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment