mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 20:53:35 +08:00
python3 fixes
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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__':
|
||||
|
||||
Reference in New Issue
Block a user