SCons: Colorize warnings/errors during generation
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
import glob, os
|
||||
import math
|
||||
from methods import print_error
|
||||
from pathlib import Path
|
||||
from os.path import normpath, basename
|
||||
|
||||
@@ -38,7 +39,7 @@ def find_files_in_folder(folder, sub_folder, include_list, extension, sought_exc
|
||||
abs_folder = base_folder_path + folder + "/" + sub_folder
|
||||
|
||||
if not os.path.isdir(abs_folder):
|
||||
print("SCU: ERROR: %s not found." % abs_folder)
|
||||
print_error(f'SCU: "{abs_folder}" not found.')
|
||||
return include_list, found_exceptions
|
||||
|
||||
os.chdir(abs_folder)
|
||||
@@ -70,7 +71,7 @@ def write_output_file(file_count, include_list, start_line, end_line, output_fol
|
||||
# create
|
||||
os.mkdir(output_folder)
|
||||
if not os.path.isdir(output_folder):
|
||||
print("SCU: ERROR: %s could not be created." % output_folder)
|
||||
print_error(f'SCU: "{output_folder}" could not be created.')
|
||||
return
|
||||
if _verbose:
|
||||
print("SCU: Creating folder: %s" % output_folder)
|
||||
@@ -104,7 +105,7 @@ def write_output_file(file_count, include_list, start_line, end_line, output_fol
|
||||
def write_exception_output_file(file_count, exception_string, output_folder, output_filename_prefix, extension):
|
||||
output_folder = os.path.abspath(output_folder)
|
||||
if not os.path.isdir(output_folder):
|
||||
print("SCU: ERROR: %s does not exist." % output_folder)
|
||||
print_error(f"SCU: {output_folder} does not exist.")
|
||||
return
|
||||
|
||||
file_text = exception_string + "\n"
|
||||
|
||||
Reference in New Issue
Block a user