Skip to content

Commit 29946c4

Browse files
authored
Merge pull request #132 from fosslight/temp
Print option name with error msg
2 parents 107b096 + 6082ff9 commit 29946c4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/fosslight_scanner/fosslight_scanner.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
386386
before_comp_f = path_arg[0]
387387
after_comp_f = path_arg[1]
388388
else:
389-
logger.error("Enter two FOSSLight report file with 'p' option.")
389+
logger.error("(compare mode) Enter two FOSSLight report file with 'p' option.")
390390
return False
391391
else:
392392
CUSTOMIZED_FORMAT = {}
@@ -405,7 +405,7 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
405405
extract_folder = src_path
406406
break
407407
else:
408-
logger.warning(f"Cannot analyze with multiple path: {path_arg}")
408+
logger.warning(f"(-p option) Cannot analyze with multiple path: {path_arg}")
409409

410410
success, msg, output_path, output_files, output_extensions, formats = check_output_formats_v2(output_file_or_dir, file_format,
411411
CUSTOMIZED_FORMAT)
@@ -420,13 +420,13 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
420420
try:
421421
if "compare" in mode_list:
422422
if before_comp_f == '' or after_comp_f == '':
423-
logger.error("before and after files are necessary.")
423+
logger.error("(compare mode) before and after files are necessary.")
424424
return False
425425
if not os.path.exists(os.path.join(_executed_path, before_comp_f)):
426-
logger.error("Cannot find before FOSSLight report file (1st param with -y option).")
426+
logger.error("(compare mode) Cannot find before FOSSLight report file (1st param with -y option).")
427427
return False
428428
if not os.path.exists(os.path.join(_executed_path, after_comp_f)):
429-
logger.error("Cannot find after FOSSLight report file (2nd param with -y option).")
429+
logger.error("(compare mode) Cannot find after FOSSLight report file (2nd param with -y option).")
430430
return False
431431
ret, final_excel_dir, result_log = init(output_path)
432432

@@ -482,7 +482,7 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
482482
if extract_folder:
483483
shutil.rmtree(extract_folder)
484484
else:
485-
logger.error("No mode has been selected for analysis.")
485+
logger.error("(mode) No mode has been selected for analysis.")
486486
try:
487487
if not keep_raw_data:
488488
logger.debug(f"Remove temporary files: {_output_dir}")

0 commit comments

Comments
 (0)