mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
OP-910: fix mixed line endings in generated QML
This commit is contained in:
parent
d54e507ffb
commit
a834226968
@ -22,12 +22,12 @@ def create_qml_file(args):
|
||||
names_list = ""
|
||||
for name in names:
|
||||
if name.strip():
|
||||
names_list += " ListElement { name: \"" + name.strip() + "\" }\n"
|
||||
names_list += " ListElement { name: \"" + name.strip() + "\" }\r\n"
|
||||
|
||||
with open(args.template, "rt") as template_file:
|
||||
with open(args.template, "rb") as template_file:
|
||||
template = template_file.read()
|
||||
|
||||
with open(args.outfile, "wt") as output_file:
|
||||
with open(args.outfile, "wb") as output_file:
|
||||
output_file.write(template.replace("${LIST_ELEMENTS}", names_list.rstrip()))
|
||||
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user