@@ -130,6 +130,8 @@ def set_missing_license_copyright(missing_license_filtered, missing_copyright_fi
130130 run (parsed_args , project )
131131 except Exception as ex :
132132 print_error ('Error_call_run_in_license :' + str (ex ))
133+ else :
134+ logger .info ("# There is no missing license file" )
133135
134136 # Print copyright
135137 if missing_copyright_filtered is not None and len (missing_copyright_filtered ) > 0 :
@@ -142,14 +144,14 @@ def set_missing_license_copyright(missing_license_filtered, missing_copyright_fi
142144
143145 if license == "" and copyright == "" :
144146 input_copyright = input_copyright_while_running ()
145-
146- input_ok = check_input_format (input_copyright )
147- if input_ok is False :
148- return
149147 else :
150148 input_copyright = copyright
151149
152150 if input_copyright != "" :
151+ input_copyright = 'Copyright ' + input_copyright
152+ input_ok = check_input_format (input_copyright )
153+ if input_ok is False :
154+ return
153155 logger .warning (f" * Your input Copyright : { input_copyright } " )
154156 parsed_args = main_parser .parse_args (['addheader' , '--copyright' ,
155157 'SPDX-FileCopyrightText: ' + str (input_copyright ),
@@ -158,6 +160,8 @@ def set_missing_license_copyright(missing_license_filtered, missing_copyright_fi
158160 run (parsed_args , project )
159161 except Exception as ex :
160162 print_error ('Error_call_run_in_copyright :' + str (ex ))
163+ else :
164+ logger .info ("# There is no missing copyright file\n " )
161165
162166
163167def get_allfiles_list (path ):
@@ -197,11 +201,6 @@ def add_content(path_to_find, file, input_license="", input_copyright=""):
197201 logger , _result_log = init_log (os .path .join (output_dir , "fosslight_reuse_add_log_" + now + ".txt" ),
198202 True , logging .INFO , logging .DEBUG , _PKG_NAME , path_to_find )
199203
200- if input_copyright != "" :
201- input_ok = check_input_format (input_copyright )
202- if input_ok is False :
203- return
204-
205204 if file != "" :
206205 file_to_check_list = file .split (',' )
207206 _check_only_file_mode = True
@@ -221,12 +220,15 @@ def add_content(path_to_find, file, input_license="", input_copyright=""):
221220 run (parsed_args , project )
222221 except Exception as ex :
223222 print_error ('Error_call_run_in_license_file_only :' + str (ex ))
223+ else :
224+ logger .info ("# There is no missing license file" )
224225
225226 if missing_copyright_list is not None and len (missing_copyright_list ) > 0 :
226227 if input_license == "" and input_copyright == "" :
227228 input_copyright = input_copyright_while_running ()
228229
229230 if input_copyright != "" :
231+ input_copyright = 'Copyright ' + input_copyright
230232 logger .warning (f" * Your input Copyright : { input_copyright } " )
231233 parsed_args = main_parser .parse_args (['addheader' , '--copyright' ,
232234 'SPDX-FileCopyrightText: ' + str (input_copyright ),
@@ -235,6 +237,8 @@ def add_content(path_to_find, file, input_license="", input_copyright=""):
235237 run (parsed_args , project )
236238 except Exception as ex :
237239 print_error ('Error_call_run_in_copyright_file_only :' + str (ex ))
240+ else :
241+ logger .info ("# There is no missing copyright file\n " )
238242 else :
239243 # Get all files List in path
240244 all_files_list = get_allfiles_list (path_to_find )
0 commit comments