Skip to content

Commit a8ff6c5

Browse files
committed
plugs/socket: Adapt format_exception
1 parent d0b5f54 commit a8ff6c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jsb/plugs/socket/irccat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import logging
2626
import socketserver
2727
import time
28+
import sys
2829
import traceback
2930
from socketserver import StreamRequestHandler, ThreadingMixIn
3031

@@ -124,7 +125,8 @@ def init_threaded():
124125
(cfg.data["host"], int(cfg.data["dbport"])), IrcCatListener
125126
)
126127
except Exception as ex:
127-
logging.error(traceback.format_exception(ex))
128+
exc_type, exc_value, exc_tb = sys.exc_info()
129+
logging.error(traceback.format_exception(exc_type, exc_value, exc_tb))
128130
return
129131
logging.warn(
130132
"starting irccat server on %s:%s" % (cfg.data["host"], cfg.data["dbport"])

0 commit comments

Comments
 (0)