From 7ca9b8da1f171694104be84100be7ec1c2dcac48 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Tue, 31 Oct 2017 21:33:01 +0800 Subject: [PATCH] [Fix]Close #569 --- vnpy/trader/vtEngine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vnpy/trader/vtEngine.py b/vnpy/trader/vtEngine.py index 1aec3a7f..f0122ace 100644 --- a/vnpy/trader/vtEngine.py +++ b/vnpy/trader/vtEngine.py @@ -340,7 +340,8 @@ class MainEngine(object): #---------------------------------------------------------------------- def registerLogEvent(self, eventType): """注册日志事件监听""" - self.eventEngine.register(eventType, self.logEngine.processLogEvent) + if self.logEngine: + self.eventEngine.register(eventType, self.logEngine.processLogEvent) #---------------------------------------------------------------------- def convertOrderReq(self, req):