Skip to content

Commit

Permalink
Merge pull request #76 from fosslight/dev_adopt_flsource_api
Browse files Browse the repository at this point in the history
Fix importing from  fl source
  • Loading branch information
JustinWonjaePark authored Sep 15, 2023
2 parents 0d9a728 + fac2c44 commit dd68bfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 2 additions & 9 deletions src/fosslight_scanner/fosslight_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit dd68bfe

Please sign in to comment.