Highlight error msg in console

This commit is contained in:
Andrey Pohilko 2012-09-14 14:34:39 +04:00
parent 1a6b3c3f99
commit 8943f70a52
2 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,7 @@ import sys
import tempfile import tempfile
import time import time
import traceback import traceback
from Tank.Plugins.ConsoleOnline import RealConsoleMarkup
# TODO: --manual-start # TODO: --manual-start
# TODO: add system resources busy check # TODO: add system resources busy check
@ -255,7 +256,9 @@ class ConsoleTank:
except Exception as ex: except Exception as ex:
self.log.debug("Exception: %s", traceback.format_exc(ex)) self.log.debug("Exception: %s", traceback.format_exc(ex))
sys.stdout.write(RealConsoleMarkup.RED)
self.log.error("%s", ex) self.log.error("%s", ex)
sys.stdout.write(RealConsoleMarkup.RESET)
rc = self.graceful_shutdown() rc = self.graceful_shutdown()
self.log.info("Done performing test with code %s", rc) self.log.info("Done performing test with code %s", rc)

View File

@ -86,8 +86,7 @@ class TankCore:
def wait_for_finish(self): def wait_for_finish(self):
self.log.info("Waiting for test to finish...") self.log.info("Waiting for test to finish...")
if not self.plugins: if not self.plugins:
self.log.warn("It's strange: we have no plugins loaded...") raise RuntimeError("It's strange: we have no plugins loaded...")
return 1;
while True: while True:
begin_time = time.time() begin_time = time.time()