Skip to content

Commit 0f4f436

Browse files
committed
Modify to input multi files
1 parent 2e73ba7 commit 0f4f436

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ binaryornot
33
requests
44
reuse
55
PyYAML
6-
fosslight_util>=1.4.3
6+
fosslight_util>=1.4.7

src/fosslight_oss_pkg/_convert.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ def convert_report(base_path, output_name, format, need_log_file=True, sheet_nam
9292
files_to_convert = base_path.split(",")
9393
for file in files_to_convert:
9494
check_extension_and_format(file, format)
95-
if base_path.endswith(".xlsx"):
95+
if file.endswith(".xlsx"):
9696
convert_excel_mode = True
97-
oss_report_files = base_path
98-
elif base_path.endswith((".yaml", ".yml")):
97+
oss_report_files = file
98+
elif file.endswith((".yaml", ".yml")):
9999
convert_yml_mode = True
100100
file_option_on = True
101101
oss_yaml_files.append(file)

src/fosslight_oss_pkg/_parsing_excel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def convert_yml_to_excel(oss_yaml_files, output_file, file_option_on, base_path)
2323
for yaml_file in oss_yaml_files:
2424
try:
2525
if os.path.isfile(yaml_file):
26-
logger.warning(f"Read data from : {yaml_file}")
26+
logger.info(f"Read data from : {yaml_file}")
2727

2828
if file_option_on:
2929
base_path = os.path.dirname(yaml_file)
@@ -39,7 +39,7 @@ def convert_yml_to_excel(oss_yaml_files, output_file, file_option_on, base_path)
3939
sheet_list)
4040
if success:
4141
if result_file:
42-
logger.info(f"Output: {result_file}")
42+
logger.warning(f"Output: {result_file}")
4343
else:
4444
logger.warning("Nothing is detected to convert so output file is not generated.")
4545
else:

0 commit comments

Comments
 (0)