修复传入gatewayName是unicode的bug
This commit is contained in:
parent
fb5b74fa20
commit
65f3625859
@ -443,7 +443,7 @@ class CtpMdApi(MdApi):
|
||||
# 如果尚未建立服务器连接,则进行连接
|
||||
if not self.connectionStatus:
|
||||
# 创建C++环境中的API对象,这里传入的参数是需要用来保存.con文件的文件夹路径
|
||||
path = os.getcwd() + '/temp/' + self.gatewayName + '/'
|
||||
path = os.getcwd() + '/temp/' + str(self.gatewayName) + '/'
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
self.createFtdcMdApi(path)
|
||||
@ -1421,7 +1421,7 @@ class CtpTdApi(TdApi):
|
||||
# 如果尚未建立服务器连接,则进行连接
|
||||
if not self.connectionStatus:
|
||||
# 创建C++环境中的API对象,这里传入的参数是需要用来保存.con文件的文件夹路径
|
||||
path = os.getcwd() + '/temp/' + self.gatewayName + '/'
|
||||
path = os.getcwd() + '/temp/' + str(self.gatewayName) + '/'
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
self.createFtdcTraderApi(path)
|
||||
|
Loading…
Reference in New Issue
Block a user