From ad35451e9bb63a551b0b1ff517706b969653f594 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Wed, 9 Dec 2015 14:32:06 +0000 Subject: bugfix: Support paths with user's home shortcut VSPERF will explicitly expand any '~' to the absolute path to the user's home directory before call of subsystem.Popen method. Only calls, which process configuration values are modified. Change-Id: Ibd9399ae84bf4698c86bf8eff97ca6ce785fb3fb JIRA: VSPERF-45 Signed-off-by: Martin Klozik Reviewed-by: Maryam Tahhan Reviewed-by: Brian Castelli Reviewed-by: Al Morton --- tools/tasks.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/tasks.py') diff --git a/tools/tasks.py b/tools/tasks.py index 33a5931a..09dd88dd 100644 --- a/tools/tasks.py +++ b/tools/tasks.py @@ -75,8 +75,9 @@ def run_task(cmd, logger, msg=None, check_error=False): logger.debug('%s%s', CMD_PREFIX, ' '.join(cmd)) try: - proc = subprocess.Popen( - cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0) + proc = subprocess.Popen(map(os.path.expanduser, cmd), + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, bufsize=0) while True: reads = [proc.stdout.fileno(), proc.stderr.fileno()] @@ -121,7 +122,7 @@ def run_background_task(cmd, logger, msg): logger.info(msg) logger.debug('%s%s', CMD_PREFIX, ' '.join(cmd)) - proc = subprocess.Popen(cmd, stdout=_get_stdout(), bufsize=0) + proc = subprocess.Popen(map(os.path.expanduser, cmd), stdout=_get_stdout(), bufsize=0) return proc.pid -- cgit 1.2.3-korg