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