From: tierno Date: Mon, 14 Sep 2020 15:18:22 +0000 (+0000) Subject: change in utils to allow string list for bash commands X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Futils;p=osm%2Fdocker-api-fe.git change in utils to allow string list for bash commands Signed-off-by: tierno --- diff --git a/osm_ee/util/util_ee.py b/osm_ee/util/util_ee.py index 1d0a232..6eb8cb5 100644 --- a/osm_ee/util/util_ee.py +++ b/osm_ee/util/util_ee.py @@ -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(