diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2015-01-26 15:32:03 -0500 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2015-07-08 17:05:21 +0100 |
commit | d7cf8535a3403fe6050e0905bef2b4429e595664 (patch) | |
tree | a455e1be2dab115c3891141f5366a0a2efeda828 | |
parent | 550dda69c6c5d527498ad928a29c466fad4e250e (diff) | |
download | sos-d7cf8535a3403fe6050e0905bef2b4429e595664.tar.gz |
[utilities] add chroot support to shell_out()
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/utilities.py | 5 |
1 files 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): |