Skip to content

Commit d23ba2e

Browse files
committed
Modify to pring log when yaml parsing
1 parent ea1a871 commit d23ba2e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/fosslight_oss_pkg/_parsing_excel.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def convert_yml_to_excel(oss_yaml_files, output_file, file_option_on, base_path)
4747
if file_option_on:
4848
base_path = os.path.dirname(yaml_file)
4949
oss_items, _, _ = parsing_yml(yaml_file, base_path)
50+
# if oss_items is abnormal(empty or invalid)
51+
if not oss_items:
52+
continue
53+
5054
for item in oss_items:
5155
items_to_print.extend(item.get_print_array())
5256
if not base_path.endswith(f"{os.sep}"):

src/fosslight_prechecker/_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def exclude_file_in_yaml(path_to_find, yaml_files, license_missing_files, copyri
242242
abnormal_yaml_files = {}
243243

244244
for file in yaml_files:
245-
oss_items, _, err_reason = parsing_yml(file, path_to_find)
245+
oss_items, _, err_reason = parsing_yml(file, path_to_find, False)
246246
# if oss_items is abnormal(empty or invalid)
247247
if not oss_items:
248248
abnormal_yaml_files[file] = err_reason

0 commit comments

Comments
 (0)