commit 2c6bcc53505da48aa625b30271c093384326314e
parent 26f792f40432af000a234fe0bbc3825829ea5338
Author: Sheng <webmaster0115@gmail.com>
Date: Thu, 9 Nov 2017 11:23:19 +0800
logging traceback exc
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/main.py b/main.py
@@ -2,6 +2,7 @@ import io
import logging
import os.path
import socket
+import traceback
import uuid
import weakref
import paramiko
@@ -166,9 +167,8 @@ class IndexHandler(tornado.web.RequestHandler):
try:
worker = self.ssh_connect()
except Exception as e:
- logging.error((type(e), e))
+ logging.error(traceback.format_exc())
status = str(e)
- # raise
else:
worker_id = worker.id
workers[worker_id] = worker