Skip to content

Commit

Permalink
Create the gyb output file if it doesn't exist
Browse files Browse the repository at this point in the history
Python behavior changed?!
  • Loading branch information
dabrahams authored Nov 12, 2024
1 parent 55c7f03 commit 06edbc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/gyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 06edbc0

Please sign in to comment.