Skip to content

Commit 9e38b67

Browse files
committed
Modify to print log using print_log
1 parent a42cd0e commit 9e38b67

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,7 +36,8 @@ 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}")
39+
if print_log:
40+
_logger.warning(f"The yaml file is empty file: {yaml_file}")
4041
return oss_list, license_list, err_reason
4142

4243
is_old_format = any(x in doc for x in OLD_YAML_ROOT_ELEMENT)
@@ -59,12 +60,12 @@ def parsing_yml(yaml_file, base_path, print_log=True):
5960
idx += 1
6061
except AttributeError as ex:
6162
if print_log:
62-
_logger.debug(f"Not supported yaml file format: {yaml_file} {ex}")
63+
_logger.warning(f"Not supported yaml file format: {yaml_file} {ex}")
6364
oss_list = []
6465
err_reason = "not_supported"
6566
except yaml.YAMLError:
6667
if print_log:
67-
_logger.debug(f"Error to parse yaml - skip to parse yaml file: {yaml_file}")
68+
_logger.warning(f"Error to parse yaml - skip to parse yaml file: {yaml_file}")
6869
oss_list = []
6970
err_reason = "yaml_error"
7071
return oss_list, set(license_list), err_reason

0 commit comments

Comments
 (0)