mirror of
https://github.com/newnius/YAO-agent.git
synced 2025-06-06 05:21:55 +00:00
update
This commit is contained in:
parent
84a8867740
commit
dc9665f62a
21
executor.py
21
executor.py
@ -191,16 +191,17 @@ class MyHandler(BaseHTTPRequestHandler):
|
|||||||
self.send_error(404, 'File Not Found: %s' % self.path)
|
self.send_error(404, 'File Not Found: %s' % self.path)
|
||||||
|
|
||||||
|
|
||||||
try:
|
if __name__ == '__main__':
|
||||||
# Create a web server and define the handler to manage the
|
try:
|
||||||
# incoming request
|
# Create a web server and define the handler to manage the
|
||||||
server = HTTPServer(('', PORT_NUMBER), MyHandler)
|
# incoming request
|
||||||
print('Started http server on port ', PORT_NUMBER)
|
server = HTTPServer(('', PORT_NUMBER), MyHandler)
|
||||||
|
print('Started http server on port ', PORT_NUMBER)
|
||||||
|
|
||||||
# Wait forever for incoming http requests
|
# Wait forever for incoming http requests
|
||||||
server.serve_forever()
|
server.serve_forever()
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print('^C received, shutting down the web server')
|
print('^C received, shutting down the web server')
|
||||||
|
|
||||||
server.socket.close()
|
server.socket.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user