From d7cf8535a3403fe6050e0905bef2b4429e595664 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 26 Jan 2015 15:32:03 -0500 Subject: [utilities] add chroot support to shell_out() Signed-off-by: Bryn M. Reeves --- sos/utilities.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sos/utilities.py b/sos/utilities.py index a82ac7c7..64756197 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -186,11 +186,12 @@ def import_module(module_fqname, superclasses=None): return modules -def shell_out(cmd, timeout=30, runat=None): +def shell_out(cmd, timeout=30, 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, timeout=timeout, chdir=runat)['output'] + return sos_get_command_output(cmd, timeout=timeout, + chroot=chroot, chdir=runat)['output'] class ImporterHelper(object): -- cgit