From: Zack Cerza Date: Mon, 15 Aug 2016 23:19:25 +0000 (-0600) Subject: Make console checking more readable X-Git-Tag: 1.1.0~548^2~14 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6f58b945496e73773511d56afc6a28d66a68174d;p=teuthology.git Make console checking more readable Signed-off-by: Zack Cerza --- diff --git a/teuthology/nuke.py b/teuthology/nuke.py index 8d589c03be..957a6dbbe6 100644 --- a/teuthology/nuke.py +++ b/teuthology/nuke.py @@ -671,12 +671,14 @@ def nuke_helper(ctx, should_unlock): if not console.check_status(): # not powered on or can't get IPMI status. Try to power on console.power_on() - # try to get status again, waiting for login prompt this time + # try to get status again log.info('checking console status of %s' % cname) - if not console.check_status(100): - log.error('Failed to get console status for %s, ' + - 'disabling console...' % cname) - log.info('console ready on %s' % cname) + if not console.check_status(timeout=100): + log.error( + "Failed to get console status for %s, " % cname + ) + else: + log.info('console ready on %s' % cname) else: log.info('console ready on %s' % cname)