Commit 41412fa4 authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: fix setCurrentSoftwareRelease

Which doesn't save the "software.cfg" extension in the .project file,
as it is done in current webrunners
parent 097a3015
......@@ -604,6 +604,8 @@ def listFolder(config, path):
def setCurrentSoftwareRelease(config, relative_project_path):
if relative_project_path.endswith(config['software_profile']):
relative_project_path = relative_project_path[:-len(config['software_profile'])]
with open(os.path.join(config['etc_dir'], ".project"), 'w') as f:
f.write(relative_project_path)
......
......@@ -566,13 +566,11 @@ def saveParameterXml():
Update instance parameter into a local xml file.
"""
project = os.path.join(app.config['etc_dir'], ".project")
current_software_release = utils.getCurrentSoftwareReleaseProfile(config)
current_software_release = utils.getCurrentSoftwareReleaseProfile(app.config)
if not current_software_release:
return jsonify(code=0, result="Please first open a Software Release")
software_release = request.form['software_release']
if current_software_release != software_release:
utils.setCurrentSoftwareRelease(app.config, software_release)
utils.setCurrentSoftwareRelease(app.config, software_release)
content = request.form['parameter'].encode("utf-8")
param_path = os.path.join(app.config['etc_dir'], ".parameter.xml")
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment