From eaba1acbc37df6685cd991815e94bfcee46f3fa9 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Wed, 5 Feb 2020 12:44:58 +0100 Subject: Fix /session execution The script now reads arguments correctly. --- src/linux/ogOperations.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/linux') diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py index 076aa3d..605bde9 100644 --- a/src/linux/ogOperations.py +++ b/src/linux/ogOperations.py @@ -62,9 +62,12 @@ def execCMD(request, ogRest): def session(request, ogRest): disk = request.getDisk() partition = request.getPartition() + cmd = f'{OG_PATH}interfaceAdm/IniciarSesion {disk} {partition}' try: - ogRest.proc = subprocess.Popen([OG_PATH + 'interfaceAdm/IniciarSesion', disk, partition], 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') -- cgit v1.2.3-18-g5258