From 6d95d129a9e0f7c94e750fc136670a7fef8a3330 Mon Sep 17 00:00:00 2001 From: 42B <42B@protonmail.com> Date: Wed, 24 Oct 2018 13:35:46 -0600 Subject: [PATCH] Use choices keyword argument to restrict `TYPE` to server or client --- i2plib/tunnel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i2plib/tunnel.py b/i2plib/tunnel.py index 4fab4e6..2fdaeba 100644 --- a/i2plib/tunnel.py +++ b/i2plib/tunnel.py @@ -151,7 +151,7 @@ class ServerTunnel(I2PTunnel): if __name__ == '__main__': parser = argparse.ArgumentParser() - parser.add_argument('type', metavar="TYPE", + parser.add_argument('type', metavar="TYPE", choices=('server', 'client'), help="Tunnel type (server or client)") parser.add_argument('address', metavar="ADDRESS", help="Local address (e.g. 127.0.0.1:8000)")