]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Add ConsoleError, and use it
authorZack Cerza <zack@redhat.com>
Tue, 16 Aug 2016 20:27:21 +0000 (14:27 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 16 Aug 2016 23:07:33 +0000 (17:07 -0600)
... instead of just a RuntimeError

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/exceptions.py
teuthology/orchestra/console.py

index 291ce2cf11e41346e47f19215ef5c381c355f7a4..8e7951187232744c8f1573e90002d1ca39741516 100644 (file)
@@ -171,3 +171,7 @@ class SkipJob(Exception):
 
 class MaxWhileTries(Exception):
     pass
+
+
+class ConsoleError(Exception):
+    pass
index a9025b72229b82bc8c5e11ded5ac3986c1577101..8e011688f934b3b7894bf3702981fb76d81898fa 100644 (file)
@@ -4,6 +4,8 @@ import time
 
 from teuthology import lockstatus as ls
 
+from ..exceptions import ConsoleError
+
 import remote
 
 try:
@@ -83,7 +85,7 @@ class PhysicalConsole():
                 self._exit_session(child)
                 if r == 0:
                     return
-        raise RuntimeError("Did not get a login prompt from %s!" % self.name)
+        raise ConsoleError("Did not get a login prompt from %s!" % self.name)
 
     def check_power(self, state, timeout=None):
         """