]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Don't print colon if there's no exception message. Also, remove testing
authorZack Cerza <zack@cerza.org>
Thu, 29 Aug 2013 19:56:15 +0000 (14:56 -0500)
committerZack Cerza <zack@cerza.org>
Thu, 29 Aug 2013 20:05:33 +0000 (15:05 -0500)
exception.

teuthology/run.py

index 53a4ab92c71d27641366562e28add3ef173dcbd0..30eb521eedc74d65e1c7021a489bff9fc5f0f55a 100644 (file)
@@ -112,7 +112,10 @@ def set_up_logging(ctx):
 def install_except_hook():
     def log_exception(exception_class, exception, traceback):
         logging.critical(''.join(format_tb(traceback)))
-        logging.critical('{0}: {1}'.format(exception_class, exception))
+        if not exception.message:
+            logging.critical(exception_class.__name__)
+            return
+        logging.critical('{0}: {1}'.format(exception_class.__name__, exception))
 
     sys.excepthook = log_exception
 
@@ -154,9 +157,6 @@ def main():
 
     write_initial_metadata(ctx)
 
-    log.debug('test')
-    raise RuntimeError('hi there')
-
     if 'targets' in ctx.config and 'roles' in ctx.config:
         targets = len(ctx.config['targets'])
         roles = len(ctx.config['roles'])