Skip to content

Commit

Permalink
[utilities] add chroot support to shell_out()
Browse files Browse the repository at this point in the history
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
  • Loading branch information
bmr-cymru committed Jul 8, 2015
1 parent 550dda6 commit d7cf853
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sos/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d7cf853

Please sign in to comment.