Skip to content

Commit 48a4a58

Browse files
authored
Merge pull request yhirose#338 from TheMaverickProgrammer/master
fixed missing import
2 parents f94c3f1 + a7a6df4 commit 48a4a58

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

split.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
import os
2+
import sys
23

34
border = '// ----------------------------------------------------------------------------'
45

6+
PythonVersion = sys.version_info[0];
7+
58
with open('httplib.h') as f:
69
lines = f.readlines()
710
inImplementation = False
8-
os.makedirs('out', exist_ok=True)
11+
12+
if PythonVersion < 3:
13+
os.makedirs('out')
14+
else:
15+
os.makedirs('out', exist_ok=True)
16+
917
with open('out/httplib.h', 'w') as fh:
1018
with open('out/httplib.cc', 'w') as fc:
1119
fc.write('#include "httplib.h"\n')

0 commit comments

Comments
 (0)