Commit ca5eb6ac authored by Michael Murtaugh's avatar Michael Murtaugh

removed 3.6 deps (fstrings)

parent 7d436aba
......@@ -2,7 +2,7 @@ Makeserver3 is a relaunch of the makeserver, written specifically to take advant
Requires
* python 3.6
* python 3.5
* aiohttp
......
......@@ -64,7 +64,7 @@ def directory_as_html(filepath, directory, prefix, editor_url=None):
file_url = '/' + urlquote(fp)
target = None
if editable(fp) and editor_url:
file_url = f"{editor_url}#{file_url}"
file_url = "{0}#{1}".format(editor_url, file_url)
target = "editor"
# if file is a directory, add '/' to the end of the name
if os.path.isdir(_file):
......@@ -103,7 +103,7 @@ async def route_get (request):
else:
return web.FileResponse(path, chunk_size=256*1024)
else:
return web.Response(text=f"404 on path {path}")
return web.Response(text="404 on path {0}".format(path))
async def route_post (request):
""" write posted text value to file """
......@@ -118,9 +118,9 @@ async def route_post (request):
f.write(text)
return web.Response(text=json.dumps({"response": "ok"}), content_type="application/json")
else:
return web.Response(text=f"no text")
return web.Response(text="no text")
else:
return web.Response(text=f"post not allowed on {path}")
return web.Response(text="post not allowed on {0}".format(path))
def main ():
ap = argparse.ArgumentParser("make & serve")
......@@ -142,4 +142,4 @@ def main ():
if __name__ == "__main__":
main()
\ No newline at end of file
main()
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