remove sendFile(...) function
This commit is contained in:
parent
5cb3a8c460
commit
6902236940
4
esgd.py
4
esgd.py
|
@ -90,10 +90,6 @@ def notFound(context):
|
||||||
def invalid(context):
|
def invalid(context):
|
||||||
context.request.sendall(b"3error: selector contains '..'!\r\n.\r\n")
|
context.request.sendall(b"3error: selector contains '..'!\r\n.\r\n")
|
||||||
|
|
||||||
def sendFile(file, context):
|
|
||||||
with open(file, "r") as fd:
|
|
||||||
sendFileArray(fd.readlines(), context)
|
|
||||||
|
|
||||||
def sendFileArray(arr, context):
|
def sendFileArray(arr, context):
|
||||||
[context.request.sendall(
|
[context.request.sendall(
|
||||||
(i.rstrip() + "\r\n").encode("utf-8")
|
(i.rstrip() + "\r\n").encode("utf-8")
|
||||||
|
|
Loading…
Reference in New Issue