From fac2c4454b235091a3ead7d0021a0ed58f75cef1 Mon Sep 17 00:00:00 2001 From: Wonjae Park Date: Thu, 7 Sep 2023 15:01:23 +0900 Subject: [PATCH] Fix importing from fl source Signed-off-by: Wonjae Park --- requirements.txt | 2 +- src/fosslight_scanner/fosslight_scanner.py | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/requirements.txt b/requirements.txt index 10ecfbf..aad2a82 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ progress pyyaml beautifulsoup4 fosslight_util>=1.4.32 -fosslight_source==1.7.0 +fosslight_source>=1.7.3 fosslight_dependency>=3.7.4 fosslight_binary>=4.1.24 fosslight_prechecker>=3.0.1 diff --git a/src/fosslight_scanner/fosslight_scanner.py b/src/fosslight_scanner/fosslight_scanner.py index 782f0c9..e5122e3 100755 --- a/src/fosslight_scanner/fosslight_scanner.py +++ b/src/fosslight_scanner/fosslight_scanner.py @@ -31,8 +31,7 @@ import subprocess fosslight_source_installed = True try: - from fosslight_source.cli import run_all_scanners as source_analysis - from fosslight_source.cli import create_report_file + from fosslight_source.cli import run_scanners as source_analysis except ModuleNotFoundError: fosslight_source_installed = False @@ -122,7 +121,6 @@ def run_scanner(src_path, dep_arguments, output_path, keep_raw_data=False, correct_fpath = src_path try: - sheet_list = {} final_excel_dir = os.path.abspath(final_excel_dir) abs_path = os.path.abspath(src_path) @@ -150,12 +148,7 @@ def run_scanner(src_path, dep_arguments, output_path, keep_raw_data=False, -1, source_analysis, abs_path, src_output, - False, num_cores) - if success: - sheet_list["SRC_FL_Source"] = [scan_item.get_row_to_print() for scan_item in result[2]] - create_report_file(0, result[2], result[3], result[4], 'all', False, - _output_dir, output_files["SRC"].split('.')[0], output_extension, - correct_mode, correct_fpath, abs_path) + False, num_cores, False) else: # Run fosslight_source by using docker image src_output = os.path.join("output", output_files["SRC"]) output_rel_path = os.path.relpath(abs_path, os.getcwd())