diff --git a/tools/bbf_common.py b/tools/bbf_common.py index eb7bf6d3..ee125322 100755 --- a/tools/bbf_common.py +++ b/tools/bbf_common.py @@ -339,6 +339,7 @@ def download_and_build_plugins(plugins, vendor_prefix): proto = get_option_value(plugin, "proto") dm_files = get_option_value(plugin, "dm_files") extra_dependencies = get_option_value(plugin, "extra_dependencies", []) + repo_path = None if repo is None or proto is None or dm_files is None or not isinstance(dm_files, list): print("Necessary input missing") @@ -362,6 +363,11 @@ def download_and_build_plugins(plugins, vendor_prefix): elif proto == "local": repo_path = repo print(f' Processing {get_repo_version_info(repo, proto)}') + + if repo_path is None: + print("Repository path not defined!!!") + BBF_ERROR_CODE += 1 + continue LIST_FILES = [] os.chdir(repo_path) diff --git a/tools/convert_dm_xml_to_json.py b/tools/convert_dm_xml_to_json.py index dcbc8e38..3ef173c5 100755 --- a/tools/convert_dm_xml_to_json.py +++ b/tools/convert_dm_xml_to_json.py @@ -746,6 +746,8 @@ def convert_xml_to_json(file_path): proto = "usp" else: proto = "both" + + model = None for child in XML_ROOT: if child.tag == "dataType": @@ -754,7 +756,7 @@ def convert_xml_to_json(file_path): if child.tag == "model": model = child - if model.tag != "model": + if model is None or model.tag != "model": print("Wrong {} XML Data model format!".format(file_path)) return