From 3b93df4e4e4035fb9bb1c3a97673ddcaa4a582a0 Mon Sep 17 00:00:00 2001 From: Ana Krivokapic Date: Thu, 20 Jun 2013 11:53:29 +0200 Subject: Use correct DS instance in ipactl status Make sure ipactl status check for correct DS instance. It should check for 'dirsrv@IPA-REALM' and not 'dirsrv.target'. https://fedorahosted.org/freeipa/ticket/3730 --- ipapython/ipautil.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ipapython/ipautil.py') diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index 3d174ed02..f2ca9d6a9 100644 --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -58,9 +58,10 @@ except ImportError: """This exception is raised when a process run by check_call() returns a non-zero exit status. The exit status will be stored in the returncode attribute.""" - def __init__(self, returncode, cmd): + def __init__(self, returncode, cmd, output=None): self.returncode = returncode self.cmd = cmd + self.output = output def __str__(self): return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) @@ -319,7 +320,7 @@ def run(args, stdin=None, raiseonerr=True, root_logger.debug('stderr=%s' % stderr) if p.returncode != 0 and raiseonerr: - raise CalledProcessError(p.returncode, arg_string) + raise CalledProcessError(p.returncode, arg_string, stdout) return (stdout, stderr, p.returncode) -- cgit