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)