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