From: Evan Broder Date: Thu, 5 Feb 2009 08:24:56 +0000 (-0500) Subject: For now, revert r2093-2095, which were committed by accident; I'm not X-Git-Tag: 0.0.21~3 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-base.git/commitdiff_plain/fa8280e5dab14d66b4a2f5c98151afbd9868f33d For now, revert r2093-2095, which were committed by accident; I'm not comfortable with them sitting on HEAD when I don't have time to test them. svn path=/trunk/packages/invirt-base/; revision=2097 --- diff --git a/debian/changelog b/debian/changelog index 2d643b8..6210c79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,3 @@ -invirt-base (0.0.21) unstable; urgency=low - - * Get rid of confusing err=True option to invirt.remctl.remctl - - -- Evan Broder Fri, 30 Jan 2009 19:49:46 -0500 - invirt-base (0.0.20) unstable; urgency=low * depend on remctl-client diff --git a/python/invirt/common.py b/python/invirt/common.py index eb2e90e..a85d955 100644 --- a/python/invirt/common.py +++ b/python/invirt/common.py @@ -75,9 +75,7 @@ class InvalidInput(Exception): class CodeError(Exception): """Exception for internal errors or bad faith input.""" - def __init__(self, message, code=None): - Exception.__init__(self, message) - self.code = code + pass # # Tests. diff --git a/python/invirt/remctl.py b/python/invirt/remctl.py index a97e422..d530d7a 100644 --- a/python/invirt/remctl.py +++ b/python/invirt/remctl.py @@ -36,6 +36,10 @@ def remctl(host, *args, **kws): stdout=subprocess.PIPE, stderr=subprocess.PIPE) v = p.wait() + if kws.get('err'): + return p.stdout.read(), p.stderr.read() if v: - raise CodeError('ERROR on remctl %s:\n%s' % (args, p.stderr.read()), v) + print >> sys.stderr, 'Error', v, 'on remctl', args, ':' + print >> sys.stderr, p.stderr.read() + raise CodeError('ERROR on remctl') return p.stdout.read()