From c5bf89ee1d12c0dbfc2498fbf7abf7b6189a6361 Mon Sep 17 00:00:00 2001 From: pengtao Date: Mon, 14 Oct 2019 14:09:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data_channel/gamelog_external.py | 1 + web.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/data_channel/gamelog_external.py b/data_channel/gamelog_external.py index b32135d..0c7f196 100644 --- a/data_channel/gamelog_external.py +++ b/data_channel/gamelog_external.py @@ -97,3 +97,4 @@ class Build_Gamelog_Config(): log.info("deploy config 2 gamelog success!") else: log.error("deploy config failed!") + raise Exception("deploy config failed!") diff --git a/web.py b/web.py index 3b48eb1..2bd91ee 100644 --- a/web.py +++ b/web.py @@ -36,8 +36,12 @@ class DispatchHandler(tornado.web.RequestHandler): self._selfupJumpRecording() def _selfgamelogexternal(self): - cc = Build_Gamelog_Config() - cc.run() + try: + cc = Build_Gamelog_Config() + cc.run() + except Exception: + return self.write({'errcode': 2, "errmsg": 'Failed'}) + return self.write({'errcode': 0, "errmsg": ''}) def selfxxx(self): pass