From 5d0171d5b70f10e3414a8af6779cf83bcb7151c1 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 28 Mar 2016 23:04:30 +0800 Subject: [PATCH] fix(web terminal and log kill) fix close web terminal when not init finished when web terminal not init complete, you close the window, online log you will see the log and cann't kill it catch a except fix it --- jlog/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jlog/views.py b/jlog/views.py index 1647f9251..55beae620 100644 --- a/jlog/views.py +++ b/jlog/views.py @@ -285,7 +285,10 @@ class TermLogRecorder(object): timestamp=int(self.recoderStartTime)) if self.user: record.user.add(self.user) - del TermLogRecorder.loglist[str(self.id)] + try: + del TermLogRecorder.loglist[str(self.id)] + except KeyError: + pass def list(self, user=None, uid=None): tmp = []