PhysicalConsole: Correctly report power_off failure
@@ -245,9 +245,10 @@ class PhysicalConsole():
timeout=self.timeout)
if r == 0:
break
- if not self.check_power('off', 60):
- log.error('Failed to power off {s}'.format(s=self.shortname))
+ if self.check_power('off', 60):
log.info('Power off for {s} completed'.format(s=self.shortname))
+ else:
+ log.error('Failed to power off {s}'.format(s=self.shortname))
def power_off_for_interval(self, interval=30):
"""
