Skip to content

Commit 35cc5e4

Browse files
committed
Update the result message
1 parent f1e4687 commit 35cc5e4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/fosslight_source/convert_scancode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def convert_json_to_excel(scancode_json, excel_name):
6262
success = False
6363
logger.warning(str(ex))
6464

65-
scan_result_msg = str(success)+" "+msg
66-
_result_log["Scan Result"] = scan_result_msg.strip()
65+
scan_result_msg = str(success) if msg == "" else str(success) + "," + msg
66+
_result_log["Scan Result"] = scan_result_msg
6767

6868
try:
6969
_str_final_result_log = yaml.safe_dump(_result_log, allow_unicode=True, sort_keys=True)

src/fosslight_source/run_scancode.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ def run_scan(path_to_scan, output_file_name="",
134134

135135
if not return_results:
136136
result_list = []
137-
scan_result_msg = str(success)+" "+msg
138-
_result_log["Scan Result"] = scan_result_msg.strip()
137+
138+
scan_result_msg = str(success) if msg == "" else str(success) + "," + msg
139+
_result_log["Scan Result"] = scan_result_msg
139140
_result_log["Output Directory"] = output_dir
140141
try:
141142
_str_final_result_log = yaml.safe_dump(_result_log, allow_unicode=True, sort_keys=True)

0 commit comments

Comments
 (0)