mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-21 17:59:40 +01:00
Previous6caa4a17ac("fix: display correct help in the idf_size.py wrapper") introduced a regression, because it uses exit_on_error parameter for argparse.ArgumentParser, which was added in python3.9, making idf_size.py incompatible with idf.py minimal required python3.8. The objective is to inspect the arguments of idf_size.py using a wrapper argparse to determine whether the legacy or refactored version should be initiated, while always displaying help for the underlying version. The exit_on_error function was previously utilized to prevent argparse from exiting and displaying help/usage. This replaces exit_on_error with a workaround that makes the --format argument optional. Since this is the sole instance where the wrapper argparse might fail, it achieves the same outcome as using exit_on_error. Fixes:6caa4a17ac("fix: display correct help in the idf_size.py wrapper") Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2.4 KiB
Executable File
2.4 KiB
Executable File