Commit 064a1450 authored by Jim Mussared's avatar Jim Mussared Committed by Damien George
Browse files

tools/pyboard.py: Add --exclusive to match --no-exclusive.


Signed-off-by: default avatarJim Mussared <jim.mussared@gmail.com>
parent be43164d
......@@ -673,10 +673,17 @@ def main():
action="store_false",
dest="follow",
)
cmd_parser.add_argument(
"--no-exclusive",
group = cmd_parser.add_mutually_exclusive_group()
group.add_argument(
"--exclusive",
action="store_true",
help="Do not try to open the serial device for exclusive access.",
default=True,
help="Open the serial device for exclusive access [default]",
)
group.add_argument(
"--no-exclusive",
action="store_false",
dest="exclusive",
)
cmd_parser.add_argument(
"-f",
......@@ -691,7 +698,7 @@ def main():
# open the connection to the pyboard
try:
pyb = Pyboard(
args.device, args.baudrate, args.user, args.password, args.wait, not args.no_exclusive
args.device, args.baudrate, args.user, args.password, args.wait, args.exclusive
)
except PyboardError as er:
print(er)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment