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")
|
||||
group.add_argument(
|
||||
"--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(
|
||||
"--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)
|
||||
return parser
|
||||
|
||||
|
|
|
@ -54,8 +54,7 @@ def simple_network_args(parser, default_port):
|
|||
group.add_argument("--bind", default="::1",
|
||||
help="hostname or IP address to bind to")
|
||||
group.add_argument("-p", "--port", default=default_port, type=int,
|
||||
help="TCP port to listen to (default: {})"
|
||||
.format(default_port))
|
||||
help="TCP port to listen to (default: %(default)d)")
|
||||
|
||||
|
||||
def init_logger(args):
|
||||
|
|
Loading…
Reference in New Issue