mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-28 22:26:21 +00:00
Add trick to ensure line endings are correct on Windows in the apixml2python.py script.
This commit is contained in:
parent
de9538cf8d
commit
a75b2d306a
1 changed files with 9 additions and 1 deletions
|
|
@ -118,12 +118,20 @@ hand_written_functions = [
|
||||||
'linphone_core_new_with_config'
|
'linphone_core_new_with_config'
|
||||||
]
|
]
|
||||||
|
|
||||||
def generate(apixmlfile, f):
|
def generate(apixmlfile, outputfile):
|
||||||
tree = ET.parse(apixmlfile)
|
tree = ET.parse(apixmlfile)
|
||||||
renderer = pystache.Renderer()
|
renderer = pystache.Renderer()
|
||||||
m = LinphoneModule(tree, blacklisted_classes, blacklisted_events, blacklisted_functions, hand_written_functions)
|
m = LinphoneModule(tree, blacklisted_classes, blacklisted_events, blacklisted_functions, hand_written_functions)
|
||||||
os.chdir('apixml2python')
|
os.chdir('apixml2python')
|
||||||
|
tmpfilename = outputfile.name + '.tmp'
|
||||||
|
f = open(tmpfilename, 'w')
|
||||||
f.write(renderer.render(m))
|
f.write(renderer.render(m))
|
||||||
|
f.close()
|
||||||
|
f = open(tmpfilename, 'rU')
|
||||||
|
for line in f:
|
||||||
|
outputfile.write(line)
|
||||||
|
f.close()
|
||||||
|
os.unlink(tmpfilename)
|
||||||
|
|
||||||
|
|
||||||
def main(argv = None):
|
def main(argv = None):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue