Get rid of confusing err=True option to invirt.remctl.remctl.
[invirt/packages/invirt-base.git] / python / invirt / remctl.py
index d530d7a..a97e422 100644 (file)
@@ -36,10 +36,6 @@ def remctl(host, *args, **kws):
                          stdout=subprocess.PIPE,
                          stderr=subprocess.PIPE)
     v = p.wait()
                          stdout=subprocess.PIPE,
                          stderr=subprocess.PIPE)
     v = p.wait()
-    if kws.get('err'):
-        return p.stdout.read(), p.stderr.read()
     if v:
     if v:
-        print >> sys.stderr, 'Error', v, 'on remctl', args, ':'
-        print >> sys.stderr, p.stderr.read()
-        raise CodeError('ERROR on remctl')
+        raise CodeError('ERROR on remctl %s:\n%s' % (args, p.stderr.read()), v)
     return p.stdout.read()
     return p.stdout.read()