From 06edbc031afce6765dfd7072993d11e91be2ad7f Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Tue, 12 Nov 2024 11:10:51 -0800 Subject: [PATCH] Create the gyb output file if it doesn't exist Python behavior changed?! --- Tools/gyb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/gyb.py b/Tools/gyb.py index 2f55987cb..3c7e327ce 100755 --- a/Tools/gyb.py +++ b/Tools/gyb.py @@ -1254,7 +1254,7 @@ def succ(a): sys.stdout.write(result_text) else: os.chdir(saved_cwd) - with io.open(args.target, 'w', encoding='utf-8', newline='\n') as f: + with io.open(args.target, 'w+', encoding='utf-8', newline='\n') as f: f.write(result_text)