19
19
from .run_scancode import run_scan
20
20
from .run_scanoss import run_scanoss_py
21
21
from .run_scanoss import get_scanoss_extra_info
22
+ import yaml
22
23
23
24
SCANOSS_SHEET_NAME = 'SRC_FL_Source'
24
25
SCANOSS_HEADER = {SCANOSS_SHEET_NAME : ['ID' , 'Source Name or Path' , 'OSS Name' ,
@@ -91,7 +92,6 @@ def main():
91
92
True , logging .INFO , logging .DEBUG , _PKG_NAME , path_to_scan )
92
93
93
94
if os .path .isdir (path_to_scan ):
94
-
95
95
if selected_scanner == 'scancode' :
96
96
success , _result_log ["Scan Result" ], scanned_result , license_list = run_scan (path_to_scan , output_file_name ,
97
97
write_json_file , - 1 , True ,
@@ -109,6 +109,10 @@ def main():
109
109
sys .exit (1 )
110
110
create_report_file (start_time , scanned_result , license_list , selected_scanner , print_matched_text ,
111
111
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 } " )
112
116
else :
113
117
logger .error (f"Check the path to scan. : { path_to_scan } " )
114
118
sys .exit (1 )
0 commit comments