Skip to content

Commit a42cd0e

Browse files
committed
Change log priority at parsing yaml
1 parent 65ca9ae commit a42cd0e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/fosslight_util/parsing_yaml.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def parsing_yml(yaml_file, base_path, print_log=True):
3636
# If yaml file is empty, return immediately
3737
if doc is None:
3838
err_reason = "empty"
39+
_logger.debug(f"The yaml file is empty file: {yaml_file}")
3940
return oss_list, license_list, err_reason
4041

4142
is_old_format = any(x in doc for x in OLD_YAML_ROOT_ELEMENT)
@@ -58,12 +59,12 @@ def parsing_yml(yaml_file, base_path, print_log=True):
5859
idx += 1
5960
except AttributeError as ex:
6061
if print_log:
61-
_logger.warning(f"Not supported yaml file format: {yaml_file} {ex}")
62+
_logger.debug(f"Not supported yaml file format: {yaml_file} {ex}")
6263
oss_list = []
6364
err_reason = "not_supported"
6465
except yaml.YAMLError:
6566
if print_log:
66-
_logger.warning(f"Error to parse yaml - skip to parse yaml file: {yaml_file}")
67+
_logger.debug(f"Error to parse yaml - skip to parse yaml file: {yaml_file}")
6768
oss_list = []
6869
err_reason = "yaml_error"
6970
return oss_list, set(license_list), err_reason
@@ -114,4 +115,4 @@ def set_value_switch(oss, key, value, yaml_file):
114115
elif key == 'yocto_recipe':
115116
oss.yocto_recipe = value
116117
else:
117-
_logger.info(f"file:{yaml_file} - key:{key} cannot be parsed")
118+
_logger.debug(f"file:{yaml_file} - key:{key} cannot be parsed")

0 commit comments

Comments
 (0)