From 28d3d6daacc0c0d47625dd3f389b607454bf70a0 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 14fcdf4fe..3a1a6bf25 100755 --- a/components/partition_table/parttool.py +++ b/components/partition_table/parttool.py @@ -253,7 +253,8 @@ def main(): print_partition_info_subparser = subparsers.add_parser("get_partition_info", help="get partition information") print_partition_info_subparser_info_type = print_partition_info_subparser.add_mutually_exclusive_group() - print_partition_info_subparser_info_type.add_argument("--info", help="type of partition information to get", nargs="+") + print_partition_info_subparser_info_type.add_argument("--info", help="type of partition information to get", + choices=["offset", "size"], default=["offset", "size"], nargs="+") print_partition_info_subparser_info_type.add_argument("--table", help="dump the partition table to a file") generate_blank_subparser = subparsers.add_parser("generate_blank_partition_file", help="generate a blank (all 0xFF) partition file of \