From 976d7ebc942dab3bd2c1b6368d96d5c263906711 Mon Sep 17 00:00:00 2001 From: tierno Date: Mon, 14 Sep 2020 15:18:22 +0000 Subject: [PATCH] change in utils to allow string list for bash commands Signed-off-by: tierno --- osm_ee/util/util_ee.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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( -- 2.25.1