From f5a754306f49e84124e8d2f641a688010e18e212 Mon Sep 17 00:00:00 2001 From: Jaekwon Bang Date: Thu, 10 Feb 2022 14:41:55 +0900 Subject: [PATCH] Modify to print output file name --- requirements.txt | 2 +- src/fosslight_scanner/fosslight_scanner.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 07e52a2..179c6b2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ xlrd openpyxl progress pyyaml -fosslight_util>=1.3.8 +fosslight_util>=1.3.12 fosslight_dependency>=3.7.4 fosslight_binary>=4.0.7 fosslight_reuse diff --git a/src/fosslight_scanner/fosslight_scanner.py b/src/fosslight_scanner/fosslight_scanner.py index 4d437f1..a26e273 100755 --- a/src/fosslight_scanner/fosslight_scanner.py +++ b/src/fosslight_scanner/fosslight_scanner.py @@ -8,6 +8,7 @@ import warnings import re import yaml +import sys from pathlib import Path from shutil import rmtree as rmdir from datetime import datetime @@ -145,7 +146,12 @@ def run_scanner(src_path, dep_arguments, output_path, keep_raw_data=False, sheet_list['SRC_FL_Dependency'] = result_list output_file_without_ext = os.path.join(final_excel_dir, output_file) - success, msg = write_output_file(output_file_without_ext, output_extension, sheet_list) + success, msg, result_file = write_output_file(output_file_without_ext, output_extension, sheet_list) + + if success: + logger.info(f"Writing Output file({result_file}, Success: {success}") + else: + logger.error(f"Fail to generate result file. msg:({msg})") result_log["Result"] = success if success: @@ -229,6 +235,7 @@ def run_main(mode, src_path, dep_arguments, output_file_or_dir, file_format, url success, msg, output_path, output_file, output_extension = check_output_format(output_file_or_dir, file_format) if not success: logger.error(msg) + sys.exit(1) else: run_src = False run_bin = False