From 521025b767f54c75c55ea088d6ae305210cfbcaf Mon Sep 17 00:00:00 2001 From: Michael E Brown Date: Thu, 29 Nov 2007 17:36:55 -0600 Subject: fixup error message for misconfigured logging.ini. pass system exit exception so we dont run eg. orphankill. log exception using correct logger. --- src/mock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mock.py b/src/mock.py index 4c8afb2..6acfd3e 100755 --- a/src/mock.py +++ b/src/mock.py @@ -328,7 +328,7 @@ def main(retParams): logging.config.fileConfig(log_ini) log_cfg.read(log_ini) except (IOError, OSError, ConfigParser.NoSectionError), e: - log.error("Could not find required logging config file: %s" % log_ini) + log.error("Log config file(%s) not correctly configured: %s" % (log_ini, e)) sys.exit(50) try: @@ -422,7 +422,7 @@ if __name__ == '__main__': main(retParams) except (SystemExit,), e: - pass + raise except (KeyboardInterrupt,), e: exitStatus = 7 @@ -444,7 +444,7 @@ if __name__ == '__main__': except (Exception,), e: exitStatus = 1 - logging.exception(e) + log.exception(e) if killOrphans and retParams: mock.util.orphansKill(retParams["chroot"].rootdir) -- cgit