]> git.llucax.com Git - software/pymin.git/commitdiff
Shutdown logging properly when exiting pymind.
authorLeandro Lucarella <llucax@gmail.com>
Wed, 18 Jun 2008 03:40:53 +0000 (00:40 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Thu, 19 Jun 2008 03:32:03 +0000 (00:32 -0300)
pymind

diff --git a/pymind b/pymind
index bc164bb45ff83b48ea24df1f9706348cc91ff9c3..3857ef89288af301088b3dbcc4703aa339d3a5dd 100755 (executable)
--- a/pymind
+++ b/pymind
@@ -82,6 +82,7 @@ def activate_ip_forward():
 
 def die(status, msg, *args):
     log.critical(msg, *args)
+    logging.shutdown()
     sys.exit(status)
 
 def get_config(paths, version, desc, add_options, defaults):
@@ -133,6 +134,7 @@ def main():
     root_handler = build_root(config, args, services.services)
     activate_ip_forward()
     PyminDaemon(root_handler, (config.bind_addr, config.bind_port)).run()
+    logging.shutdown()
 
 if __name__ == '__main__':
     main()