1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

OP-910: don't use python 2.7+ features (make it compatible with 2.6)

This commit is contained in:
Oleg Semyonov 2013-06-06 00:46:59 +03:00
parent 13e7f51174
commit d54e507ffb

View File

@ -24,8 +24,10 @@ def create_qml_file(args):
if name.strip():
names_list += " ListElement { name: \"" + name.strip() + "\" }\n"
with open(args.template, "rt") as template_file, open(args.outfile, "wt") as output_file:
with open(args.template, "rt") as template_file:
template = template_file.read()
with open(args.outfile, "wt") as output_file:
output_file.write(template.replace("${LIST_ELEMENTS}", names_list.rstrip()))
return 0