(address=LISTEN_ADDRESS, port=LISTEN_PORT)
| 238 | return |
| 239 | |
| 240 | def run(address=LISTEN_ADDRESS, port=LISTEN_PORT): |
| 241 | global _alive |
| 242 | global _server |
| 243 | try: |
| 244 | _alive = True |
| 245 | _server = ThreadingServer((address, port), ReqHandler) |
| 246 | print("[i] running HTTP server at 'http://%s:%d'" % (address, port)) |
| 247 | _server.serve_forever() |
| 248 | except KeyboardInterrupt: |
| 249 | _server.socket.close() |
| 250 | raise |
| 251 | finally: |
| 252 | _alive = False |
| 253 | |
| 254 | if __name__ == "__main__": |
| 255 | try: |
no test coverage detected