- change : CTP_connect 通过 VT_setting.json 文件来指定
This commit is contained in:
parent
3cbf54cffa
commit
d4686b6275
@ -7,7 +7,7 @@ vn.ctp的gateway接入
|
|||||||
vtSymbol直接使用symbol
|
vtSymbol直接使用symbol
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
import vtGlobal
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
from copy import copy
|
from copy import copy
|
||||||
@ -98,9 +98,11 @@ class CtpGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
fileName = self.gatewayName + '_connect.json'
|
fileName = vtGlobal.VT_setting.get(self.gatewayName + '_connect')
|
||||||
path = os.path.abspath(os.path.dirname(__file__))
|
if fileName is None:
|
||||||
fileName = os.path.join(path, fileName)
|
fileName = self.gatewayName + '_connect.json'
|
||||||
|
path = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
fileName = os.path.join(path, fileName)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
f = file(fileName)
|
f = file(fileName)
|
||||||
|
Loading…
Reference in New Issue
Block a user