From 684cfb7e4795b92acbdfb9ae8bf2f6703d4b6f54 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Fri, 9 Feb 2018 17:12:03 +0800 Subject: [PATCH] =?UTF-8?q?[Mode]=E6=9B=BF=E6=8D=A2run.py=E4=B8=AD?= =?UTF-8?q?=E7=9A=84Tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/WebTrader/run.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/WebTrader/run.py b/examples/WebTrader/run.py index af98f0a7..9ef13785 100644 --- a/examples/WebTrader/run.py +++ b/examples/WebTrader/run.py @@ -383,7 +383,6 @@ class Tick(Resource): #---------------------------------------------------------------------- def post(self): """订阅""" - print 'posting to tick' args = self.parser.parse_args() token = args['token'] if token != TOKEN: @@ -625,9 +624,9 @@ def handleEvent(event): eventData = event.dict_['data'] if not isinstance(eventData, dict): - eventData = eventData.__dict__ + eventData = eventData.__dict__ - if( eventType == 'eTick.' ): + if eventType == 'eTick.': del eventData['datetime'] socketio.emit(eventType, eventData)