This is an automated email from the ASF dual-hosted git repository. lupyuen pushed a commit to branch releases/12.9 in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/releases/12.9 by this push: new 3c21e0ffb1 tools/host_info_dump.py: fix UnboundLocalError: local variable 'vendor_specific_module_path' referenced before assignment 3c21e0ffb1 is described below commit 3c21e0ffb173b4ca40644ebdb3b167a4817b5c3a Author: simbit18 <simbi...@gmail.com> AuthorDate: Wed Apr 9 18:07:50 2025 +0200 tools/host_info_dump.py: fix UnboundLocalError: local variable 'vendor_specific_module_path' referenced before assignment fix Traceback (most recent call last): File "/home/ubuntu20042/nuttxspace/nuttx/tools/host_info_dump.py", line 575, in <module> header = generate_header(args) File "/home/ubuntu20042/nuttxspace/nuttx/tools/host_info_dump.py", line 466, in generate_header sys.path.append(os.path.abspath(vendor_specific_module_path)) UnboundLocalError: local variable 'vendor_specific_module_path' referenced before assignment make: *** [tools/Unix.mk:644: host_info] Error 1 --- tools/host_info_dump.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/host_info_dump.py b/tools/host_info_dump.py index 5d480ebb70..2910ec3762 100755 --- a/tools/host_info_dump.py +++ b/tools/host_info_dump.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# tools/host_sysinfo.py +# tools/host_info_dump.py # # SPDX-License-Identifier: Apache-2.0 # @@ -462,13 +462,12 @@ def generate_header(args): )[-1] if "esp" in arch_chip: vendor_specific_module_path = os.path.abspath("./tools/espressif") - - sys.path.append(os.path.abspath(vendor_specific_module_path)) - vendor_specific_module = importlib.import_module("chip_info") - get_vendor_info = getattr(vendor_specific_module, "get_vendor_info") - vendor_output, vendor_build_output = get_vendor_info(info["NUTTX_CONFIG"]) - output += vendor_output - build_output += vendor_build_output + sys.path.append(os.path.abspath(vendor_specific_module_path)) + vendor_specific_module = importlib.import_module("chip_info") + get_vendor_info = getattr(vendor_specific_module, "get_vendor_info") + vendor_output, vendor_build_output = get_vendor_info(info["NUTTX_CONFIG"]) + output += vendor_output + build_output += vendor_build_output verbose(info, build_output)