Skip to content

Commit a81ff0d

Browse files
authored
Merge pull request #22 from fosslight/temp
Modify to print output file name
2 parents f246d76 + f5a7543 commit a81ff0d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ xlrd
55
openpyxl
66
progress
77
pyyaml
8-
fosslight_util>=1.3.8
8+
fosslight_util>=1.3.12
99
fosslight_dependency>=3.7.4
1010
fosslight_binary>=4.0.7
1111
fosslight_reuse

src/fosslight_scanner/fosslight_scanner.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import warnings
99
import re
1010
import yaml
11+
import sys
1112
from pathlib import Path
1213
from shutil import rmtree as rmdir
1314
from datetime import datetime
@@ -145,7 +146,12 @@ def run_scanner(src_path, dep_arguments, output_path, keep_raw_data=False,
145146
sheet_list['SRC_FL_Dependency'] = result_list
146147

147148
output_file_without_ext = os.path.join(final_excel_dir, output_file)
148-
success, msg = write_output_file(output_file_without_ext, output_extension, sheet_list)
149+
success, msg, result_file = write_output_file(output_file_without_ext, output_extension, sheet_list)
150+
151+
if success:
152+
logger.info(f"Writing Output file({result_file}, Success: {success}")
153+
else:
154+
logger.error(f"Fail to generate result file. msg:({msg})")
149155

150156
result_log["Result"] = success
151157
if success:
@@ -229,6 +235,7 @@ def run_main(mode, src_path, dep_arguments, output_file_or_dir, file_format, url
229235
success, msg, output_path, output_file, output_extension = check_output_format(output_file_or_dir, file_format)
230236
if not success:
231237
logger.error(msg)
238+
sys.exit(1)
232239
else:
233240
run_src = False
234241
run_bin = False

0 commit comments

Comments
 (0)