mirror of https://github.com/ArduPilot/ardupilot
Tools: Rename scrimmage template to have .j2 extension
* This fixes an error in pre-commit's check-xml hook * Tools/autotest/template/scrimmage.xml: Failed to xml parse (Tools/autotest/template/scrimmage.xml:8:7: not well-formed (invalid token)) * Since it's a template file, it is not parseable as XML till after it's rendered by jinja Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
parent
d47b60b92a
commit
868f562e1b
|
@ -1617,7 +1617,7 @@ if cmd_opts.frame in ['scrimmage-plane', 'scrimmage-copter']:
|
|||
entities[i][k] = v
|
||||
config['entities'] = list(entities.values())
|
||||
env = Environment(loader=FileSystemLoader(os.path.join(autotest_dir, 'template')))
|
||||
mission = env.get_template('scrimmage.xml').render(**config)
|
||||
mission = env.get_template('scrimmage.xml.j2').render(**config)
|
||||
tmp = mkstemp()
|
||||
atexit.register(os.remove, tmp[1])
|
||||
|
||||
|
|
Loading…
Reference in New Issue