From e3ea9430886a195d17d2e0ef8f167b2d3003044e Mon Sep 17 00:00:00 2001 From: KonstantinKondrashov Date: Wed, 13 May 2020 13:33:46 +0800 Subject: [PATCH] partition_table: Fix parttool.py crashes when retrieving partition info Closes: IDFGH-3279 Closes: https://github.com/espressif/esp-idf/issues/5271 --- components/partition_table/parttool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/partition_table/parttool.py b/components/partition_table/parttool.py index a0af2f6f7..df3e8c9f7 100755 --- a/components/partition_table/parttool.py +++ b/components/partition_table/parttool.py @@ -261,7 +261,8 @@ def main(): subparsers.add_parser("erase_partition", help="erase the contents of a partition on the device", parents=[partition_selection_parser]) print_partition_info_subparser = subparsers.add_parser("get_partition_info", help="get partition information", parents=[partition_selection_parser]) - print_partition_info_subparser.add_argument("--info", help="type of partition information to get", nargs="+") + print_partition_info_subparser.add_argument("--info", help="type of partition information to get", + choices=["offset", "size"], default=["offset", "size"], nargs="+") args = parser.parse_args() quiet = args.quiet