Skip to content

Commit e932c7e

Browse files
Update split.py
now works with legacy Python ( < 3.0)
1 parent f94c3f1 commit e932c7e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

split.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22

33
border = '// ----------------------------------------------------------------------------'
44

5+
PythonVersion = sys.version_info[0];
6+
57
with open('httplib.h') as f:
68
lines = f.readlines()
79
inImplementation = False
8-
os.makedirs('out', exist_ok=True)
10+
11+
if PythonVersion < 3:
12+
os.makedirs('out')
13+
else:
14+
os.makedirs('out', exist_ok=True)
15+
916
with open('out/httplib.h', 'w') as fh:
1017
with open('out/httplib.cc', 'w') as fc:
1118
fc.write('#include "httplib.h"\n')

0 commit comments

Comments
 (0)