From 1cc1d41b2f4f3ac19fecc2dbe23cf3886e0b59bb Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 16 Aug 2016 14:27:21 -0600 Subject: [PATCH] Add ConsoleError, and use it ... instead of just a RuntimeError Signed-off-by: Zack Cerza --- teuthology/exceptions.py | 4 ++++ teuthology/orchestra/console.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/teuthology/exceptions.py b/teuthology/exceptions.py index 291ce2cf11..8e79511872 100644 --- a/teuthology/exceptions.py +++ b/teuthology/exceptions.py @@ -171,3 +171,7 @@ class SkipJob(Exception): class MaxWhileTries(Exception): pass + + +class ConsoleError(Exception): + pass diff --git a/teuthology/orchestra/console.py b/teuthology/orchestra/console.py index a9025b7222..8e011688f9 100644 --- a/teuthology/orchestra/console.py +++ b/teuthology/orchestra/console.py @@ -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): """ -- 2.39.5