mirror of
https://github.com/ceph/ceph
synced 2025-03-07 16:58:39 +00:00
Don't print colon if there's no exception message. Also, remove testing
exception.
This commit is contained in:
parent
83a5ab19b0
commit
40f1d4fc58
@ -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'])
|
||||
|
Loading…
Reference in New Issue
Block a user