stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
v = p.wait()
- if kws.get('err'):
- return p.stdout.read(), p.stderr.read()
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()