From 530a8004fcbc8e04ebf54897e323419ca579e727 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 26 Jan 2015 15:32:03 -0500 Subject: [PATCH 77/93] [utilities] add chroot support to shell_out() Signed-off-by: Bryn M. Reeves --- sos/utilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sos/utilities.py b/sos/utilities.py index cc25a8f..ef3e115 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -184,11 +184,11 @@ def import_module(module_fqname, superclasses=None): return modules -def shell_out(cmd, runat=None): +def shell_out(cmd, chroot=None, runat=None): """Shell out to an external command and return the output or the empty string in case of error. """ - return sos_get_command_output(cmd, chdir=runat)['output'] + return sos_get_command_output(cmd, chroot=chroot, chdir=runat)['output'] class ImporterHelper(object): -- 1.9.3