python3 fixes

This commit is contained in:
Thomas Gubler
2015-10-10 11:03:04 +02:00
parent a33568cd49
commit 2bbb1ad35f
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -3,8 +3,8 @@ import xml.etree.ElementTree as ET
import os
if len(os.sys.argv) != 2:
print "Error in %s" % os.sys.argv[0]
print "Usage: %s <parameters.xml>"
print("Error in %s" % os.sys.argv[0])
print("Usage: %s <parameters.xml>" % os.sys.argv[0])
raise SystemExit
fp_header = open("px4_parameters.h", "w")
+1 -1
View File
@@ -77,7 +77,7 @@ def main():
# overwrite old scratch file
with open(file_path, "wb") as f:
f.write(pruned_content)
f.write(pruned_content.encode("ascii", errors='strict'))
if __name__ == '__main__':