diff --git a/Tools/openai_gpts/gen_gpt_templ.py b/Tools/openai_gpts/gen_gpt_templ.py index dfddf80..2aa47b5 100644 --- a/Tools/openai_gpts/gen_gpt_templ.py +++ b/Tools/openai_gpts/gen_gpt_templ.py @@ -602,7 +602,7 @@ def main(): # Process response file filename = args.input[1:] # Remove the @ prefix success_count, error_count = process_response_file(filename, args.debug, args.dump) - sys.exit(0 if error_count == 0 else 1) + return 0 if error_count == 0 else 1 else: # Process single input print(f"\n[INPUT] Processing: {args.input}") @@ -646,9 +646,11 @@ def main(): print(f"Error: {result}") return 1 + return 0 + except Exception as e: print(f"Error: {e}") return 1 if __name__ == "__main__": - main() \ No newline at end of file + sys.exit(main()) \ No newline at end of file