- return call(['remctl', host, 'remote', 'control'] + argv[1:])
+ p = Popen(['remctl', host, 'remote', 'control'] + argv[1:],
+ stdout=PIPE, stderr=PIPE)
+ (out, err) = p.communicate()
+ if p.returncode == 1:
+ print >>sys.stderr, "machine '%s' is not on" % machine_name
+ return 1
+ sys.stderr.write(err)
+ sys.stdout.write(out)
+ return p.returncode