change in utils to allow string list for bash commands utils
authortierno <alfonso.tiernosepulveda@telefonica.com>
Mon, 14 Sep 2020 15:18:22 +0000 (15:18 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Mon, 14 Sep 2020 15:18:53 +0000 (15:18 +0000)
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_ee/util/util_ee.py

index 1d0a232..6eb8cb5 100644 (file)
@@ -33,7 +33,11 @@ async def local_async_exec(command: str
         Executed a local command using asyncio.
         TODO - do not know yet if return error code, and stdout and strerr or just one of them
     """
-    scommand = split(command)
+    if isinstance(command, str):
+        scommand = split(command)
+    else  #  isinstance(command, (list, tuple)):
+        scommand = command
+
 
     logger.debug("Execute local command: {}".format(command))
     process = await asyncio.create_subprocess_exec(