From 78c408e7804bdc70806bfaccac4067a001a7cb2c Mon Sep 17 00:00:00 2001 From: Elias Bachaalany Date: Wed, 30 Jul 2025 06:14:48 -0700 Subject: [PATCH] Update gen_gpt_templ.py --- Tools/openai_gpts/gen_gpt_templ.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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