LR v0.4.15: upgrade LR procedure improved (update_conf flag); info api fixed.

Change-Id: I11f26ace16997bce6d26c5ad067b880d6418ee08
This commit is contained in:
Nicola Peditto 2019-07-30 10:12:04 +02:00
parent 7f15d58f70
commit ffe82362be
2 changed files with 14 additions and 5 deletions

View File

@ -240,14 +240,23 @@ class DeviceManager(Module.Module):
else:
version = None # latest
if 'update_conf' in parameters:
update_conf = parameters['update_conf']
if update_conf == "":
update_conf = False
else:
update_conf = False
if (version != None) and (version != "latest") and (version != ""):
LOG.info("--> version specified: " + str(version))
command = "pip3 install iotronic-lightningrod==" + str(version) \
+ " && lr_install"
command = "pip3 install iotronic-lightningrod==" + str(version)
else:
LOG.info("--> version not specified: set 'latest'")
command = "pip3 install --upgrade " \
+ "iotronic-lightningrod && lr_install"
command = "pip3 install --upgrade iotronic-lightningrod"
if update_conf:
LOG.info("--> overwrite iotronic.conf: True")
command = command + " && lr_install"
print("\nUpgrading LR: " + str(command))

View File

@ -162,7 +162,7 @@ class RestManager(Module.Module):
)
}
return str(info)
return info
@app.route('/status')
def status():