From 4390523b7f854cefcb91843e1df3ca7575d43fea Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Sun, 21 Dec 2008 17:12:00 -0700 Subject: Improved Plugin.call() method and added its unit test --- ipalib/errors.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ipalib/errors.py') diff --git a/ipalib/errors.py b/ipalib/errors.py index 6dd6eb01..7191ff40 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -124,6 +124,14 @@ def _(text): return text +class SubprocessError(StandardError): + def __init__(self, returncode, argv): + self.returncode = returncode + self.argv = argv + StandardError.__init__(self, + 'return code %d from %r' % (returncode, argv) + ) + class HandledError(StandardError): """ Base class for errors that can be raised across a remote procedure call. -- cgit