out, err = remctl('control', machine.name, 'listhost', err=True)
if err:
return None
- return out
+ return out.strip()
def deleteVM(machine):
"""Delete a VM."""
out, err = remctl('control', machine.name, 'reboot',
err=True)
if err:
- if re.match("Error: Domain '.*' does not exist.", err):
+ if re.match("machine '.*' is not on", err):
raise InvalidInput("action", "reboot",
"Machine is not on")
else: