]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Make console checking more readable
authorZack Cerza <zack@redhat.com>
Mon, 15 Aug 2016 23:19:25 +0000 (17:19 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 16 Aug 2016 23:06:38 +0000 (17:06 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/nuke.py

index 8d589c03be3cf21df98549a2ac82bc6fc4c16b93..957a6dbbe66e0cf80da689df1c9866804d7d0582 100644 (file)
@@ -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)