mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-04 05:09:53 +01:00
Make generateSingleHeader.py Python 2.7 compatible
This commit is contained in:
parent
6583284731
commit
b6d9976fbb
@ -36,8 +36,11 @@ for arg in sys.argv[1:]:
|
|||||||
print( "\n** Unrecognised argument: " + arg + " **\n" )
|
print( "\n** Unrecognised argument: " + arg + " **\n" )
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
# ensure that the output directory exists
|
|
||||||
os.makedirs(os.path.dirname(outputPath), exist_ok = True)
|
# ensure that the output directory exists (hopefully no races)
|
||||||
|
outDir = os.path.dirname(outputPath)
|
||||||
|
if not os.path.exists(outDir):
|
||||||
|
os.makedirs(outDir)
|
||||||
out = open( outputPath, 'w' )
|
out = open( outputPath, 'w' )
|
||||||
ifdefs = 0
|
ifdefs = 0
|
||||||
implIfDefs = -1
|
implIfDefs = -1
|
||||||
|
Loading…
Reference in New Issue
Block a user