Skip to content

Commit

Permalink
pw_system: Remove use of BooleanOptionalAction
Browse files Browse the repository at this point in the history
Remove use of argparse.BooleanOptionalAction which isn't supported by
Python 3.8.

Change-Id: I1d7ea1dbf6045f620604d6c9e970fd622ed98a69
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/111671
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Anthony DiGirolamo <tonymd@google.com>
  • Loading branch information
mohrr authored and CQ Bot Account committed Sep 23, 2022
1 parent 632c605 commit f5c5c1f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pw_system/py/pw_system/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,18 @@ def _parse_args():
dest='use_ipython',
help='Use IPython instead of pw_console.')

# TODO(b/248257406) Use argparse.BooleanOptionalAction when Python 3.8 is
# no longer supported.
parser.add_argument('--rpc-logging',
action=argparse.BooleanOptionalAction,
action='store_true',
default=True,
help='Use pw_rpc based logging.')

parser.add_argument('--no-rpc-logging',
action='store_false',
dest='rpc_logging',
help="Don't use pw_rpc based logging.")

return parser.parse_args()


Expand Down

0 comments on commit f5c5c1f

Please sign in to comment.