From 9f4f42eefde54cee28a9d2a2ac9ac63595923013 Mon Sep 17 00:00:00 2001 From: BreakWa11 Date: Fri, 22 Apr 2016 23:48:41 +0800 Subject: [PATCH] catch exit exception --- server_pool.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server_pool.py b/server_pool.py index a3bad6e..d7fb4b3 100644 --- a/server_pool.py +++ b/server_pool.py @@ -86,6 +86,10 @@ class ServerPool(object): import traceback traceback.print_exc() os.exit(0) + except Exception as e: + logging.error(e) + import traceback + traceback.print_exc() def server_is_run(self, port): port = int(port)