|
@ -456,6 +456,7 @@ def main(): |
|
|
snrpc.debug = args.debug |
|
|
snrpc.debug = args.debug |
|
|
snrpc.defaultkey = args.key |
|
|
snrpc.defaultkey = args.key |
|
|
|
|
|
|
|
|
|
|
|
if hasattr(signal, 'SIGPIPE'): |
|
|
signal.signal(signal.SIGPIPE, signal.SIG_DFL) |
|
|
signal.signal(signal.SIGPIPE, signal.SIG_DFL) |
|
|
|
|
|
|
|
|
socketserver.TCPServer.allow_reuse_address = True |
|
|
socketserver.TCPServer.allow_reuse_address = True |
|
@ -463,6 +464,7 @@ def main(): |
|
|
|
|
|
|
|
|
httpd = socketserver.TCPServer(("", args.port), handler) |
|
|
httpd = socketserver.TCPServer(("", args.port), handler) |
|
|
try: |
|
|
try: |
|
|
|
|
|
print(f"Serving HTTP at port {args.port} (http://localhost:{args.port}/) ...") |
|
|
httpd.serve_forever() |
|
|
httpd.serve_forever() |
|
|
except KeyboardInterrupt: |
|
|
except KeyboardInterrupt: |
|
|
return |
|
|
return |
|
|