From 28e954902d4df6bf5562c7c0646277152bba4da3 Mon Sep 17 00:00:00 2001 From: lakshyacis Date: Wed, 4 Sep 2019 17:40:28 +0530 Subject: [PATCH] httpd flake8 fixes --- src/network/httpd.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/network/httpd.py b/src/network/httpd.py index b8b6ba21..ba53c7fc 100644 --- a/src/network/httpd.py +++ b/src/network/httpd.py @@ -3,6 +3,7 @@ import socket from tls import TLSHandshake + class HTTPRequestHandler(asyncore.dispatcher): response = """HTTP/1.0 200 OK\r Date: Sun, 23 Oct 2016 18:02:00 GMT\r @@ -66,7 +67,12 @@ class HTTPSRequestHandler(HTTPRequestHandler, TLSHandshake): if not hasattr(self, '_map'): asyncore.dispatcher.__init__(self, sock) # self.tlsDone = False - TLSHandshake.__init__(self, sock=sock, certfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/cert.pem', keyfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/key.pem', server_side=True) + TLSHandshake.__init__( + self, + sock=sock, + certfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/cert.pem', + keyfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/key.pem', + server_side=True) HTTPRequestHandler.__init__(self, sock) def handle_connect(self): @@ -143,6 +149,7 @@ class HTTPSServer(HTTPServer): # print "Processed %i connections, active %i" % (self.connections, len(asyncore.socket_map)) HTTPSRequestHandler(sock) + if __name__ == "__main__": client = HTTPSServer() asyncore.loop()