File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -503,8 +503,10 @@ def main():
503503
504504 start_time = datetime .datetime .now () # Get the start time of the program
505505
506- if not verify_filepath_exists (FILE_PATH ): # If the file does not exist
507- print (f"{ BackgroundColors .RED } Error: Target file { BackgroundColors .CYAN } { FILE_PATH } { BackgroundColors .RED } not found!{ Style .RESET_ALL } " ) # Output error message
506+ file_path_str = str (FILE_PATH ) # Convert FILE_PATH to string for logging
507+
508+ if not verify_filepath_exists (file_path_str ): # If the target file does not exist, output an error message and exit
509+ print (f"{ BackgroundColors .RED } Error: Target file { BackgroundColors .CYAN } { file_path_str } { BackgroundColors .RED } not found!{ Style .RESET_ALL } " ) # Output error message
508510 return # Exit the function
509511
510512 original_text = FILE_PATH .read_text (encoding = "utf-8" ) # Read the original file content
You can’t perform that action at this time.
0 commit comments