1919from .run_scancode import run_scan
2020from .run_scanoss import run_scanoss_py
2121from .run_scanoss import get_scanoss_extra_info
22+ import yaml
2223
2324SCANOSS_SHEET_NAME = 'SRC_FL_Source'
2425SCANOSS_HEADER = {SCANOSS_SHEET_NAME : ['ID' , 'Source Name or Path' , 'OSS Name' ,
@@ -91,7 +92,6 @@ def main():
9192 True , logging .INFO , logging .DEBUG , _PKG_NAME , path_to_scan )
9293
9394 if os .path .isdir (path_to_scan ):
94-
9595 if selected_scanner == 'scancode' :
9696 success , _result_log ["Scan Result" ], scanned_result , license_list = run_scan (path_to_scan , output_file_name ,
9797 write_json_file , - 1 , True ,
@@ -109,6 +109,10 @@ def main():
109109 sys .exit (1 )
110110 create_report_file (start_time , scanned_result , license_list , selected_scanner , print_matched_text ,
111111 output_path , output_file , output_extension )
112+ try :
113+ logger .info (yaml .safe_dump (_result_log , allow_unicode = True , sort_keys = True ))
114+ except Exception as ex :
115+ logger .debug (f"Failed to print log.: { ex } " )
112116 else :
113117 logger .error (f"Check the path to scan. : { path_to_scan } " )
114118 sys .exit (1 )
0 commit comments