mirror of https://github.com/m-labs/artiq.git
use %(default) in argparse
This commit is contained in:
parent
b597483913
commit
bd145bbabc
|
@ -22,10 +22,10 @@ def get_argparser():
|
||||||
help="hostname or IP address to bind to")
|
help="hostname or IP address to bind to")
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--port-notify", default=3250, type=int,
|
"--port-notify", default=3250, type=int,
|
||||||
help="TCP port to listen to for notifications (default: 3250)")
|
help="TCP port to listen to for notifications (default: %(default)d)")
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--port-control", default=3251, type=int,
|
"--port-control", default=3251, type=int,
|
||||||
help="TCP port to listen to for control (default: 3251)")
|
help="TCP port to listen to for control (default: %(default)d)")
|
||||||
verbosity_args(parser)
|
verbosity_args(parser)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,7 @@ def simple_network_args(parser, default_port):
|
||||||
group.add_argument("--bind", default="::1",
|
group.add_argument("--bind", default="::1",
|
||||||
help="hostname or IP address to bind to")
|
help="hostname or IP address to bind to")
|
||||||
group.add_argument("-p", "--port", default=default_port, type=int,
|
group.add_argument("-p", "--port", default=default_port, type=int,
|
||||||
help="TCP port to listen to (default: {})"
|
help="TCP port to listen to (default: %(default)d)")
|
||||||
.format(default_port))
|
|
||||||
|
|
||||||
|
|
||||||
def init_logger(args):
|
def init_logger(args):
|
||||||
|
|
Loading…
Reference in New Issue