summaryrefslogtreecommitdiffstats
path: root/src/linux
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-02-05 12:39:42 +0100
committerAlvaro Neira Ayuso <aneira@soleta.eu>2020-02-05 13:42:10 +0100
commitfe4236dcd805b46618dc2c5e7325d732ac5fd530 (patch)
tree3d0ef9d211b636efebf65d5f38ae381376100ce1 /src/linux
parent680214317eef44f86d99d329f886e56743596def (diff)
Fix /image/restore execution and response
Diffstat (limited to 'src/linux')
-rw-r--r--src/linux/ogOperations.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py
index e9592ff..076aa3d 100644
--- a/src/linux/ogOperations.py
+++ b/src/linux/ogOperations.py
@@ -137,9 +137,13 @@ def image_restore(request, ogRest):
ctype = request.getType()
profile = request.getProfile()
cid = request.getId()
+ cmd = f'{OG_PATH}interfaceAdm/RestaurarImagen {disk} {partition} ' \
+ f'{name} {repo} {ctype}'
try:
- ogRest.proc = subprocess.Popen([OG_PATH + 'interfaceAdm/RestaurarImagen', disk, partition, name, repo, ctype], stdout=subprocess.PIPE, shell=True)
+ ogRest.proc = subprocess.Popen([cmd],
+ stdout=subprocess.PIPE,
+ shell=True)
(output, error) = ogRest.proc.communicate()
except:
raise ValueError('Error: Incorrect command value')