commit
4f2e04c776
@ -46,7 +46,7 @@ class CoincheckGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -56,6 +56,7 @@ class CoincheckGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
accessKey = str(setting['accessKey'])
|
accessKey = str(setting['accessKey'])
|
||||||
secretKey = str(setting['secretKey'])
|
secretKey = str(setting['secretKey'])
|
||||||
|
@ -47,7 +47,7 @@ class korbitGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -57,6 +57,7 @@ class korbitGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
self.accountID = str(setting["accountID"])
|
self.accountID = str(setting["accountID"])
|
||||||
self.accessKey = str(setting['accessKey'])
|
self.accessKey = str(setting['accessKey'])
|
||||||
|
@ -65,7 +65,7 @@ class zbGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -75,6 +75,7 @@ class zbGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
secretKey = str(setting['secretKey'])
|
secretKey = str(setting['secretKey'])
|
||||||
|
@ -96,7 +96,7 @@ class TkproGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -105,6 +105,7 @@ class TkproGateway(VtGateway):
|
|||||||
return
|
return
|
||||||
|
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
username = str(setting['username'])
|
username = str(setting['username'])
|
||||||
token = str(setting['token'])
|
token = str(setting['token'])
|
||||||
|
@ -52,7 +52,7 @@ class BigoneGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -62,6 +62,7 @@ class BigoneGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
apiSecret = str(setting['apiSecret'])
|
apiSecret = str(setting['apiSecret'])
|
||||||
|
@ -68,7 +68,7 @@ class BinanceGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -78,6 +78,7 @@ class BinanceGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
secretKey = str(setting['secretKey'])
|
secretKey = str(setting['secretKey'])
|
||||||
|
@ -51,7 +51,7 @@ class BitfinexGateay(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -61,6 +61,7 @@ class BitfinexGateay(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
secretKey = str(setting['secretKey'])
|
secretKey = str(setting['secretKey'])
|
||||||
|
@ -78,7 +78,7 @@ class BithumbGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -88,6 +88,7 @@ class BithumbGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
apiSecret = str(setting['apiSecret'])
|
apiSecret = str(setting['apiSecret'])
|
||||||
|
@ -61,7 +61,7 @@ class BitmexGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -71,6 +71,7 @@ class BitmexGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
apiSecret = str(setting['apiSecret'])
|
apiSecret = str(setting['apiSecret'])
|
||||||
|
@ -59,7 +59,7 @@ class CcxtGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -69,6 +69,7 @@ class CcxtGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
exchange = str(setting['exchange'])
|
exchange = str(setting['exchange'])
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
|
@ -58,7 +58,7 @@ class CoinbaseGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -68,6 +68,7 @@ class CoinbaseGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
secretKey = str(setting['secretKey'])
|
secretKey = str(setting['secretKey'])
|
||||||
|
@ -104,7 +104,7 @@ class CshshlpGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -114,6 +114,7 @@ class CshshlpGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
userID = str(setting['userID'])
|
userID = str(setting['userID'])
|
||||||
|
@ -60,7 +60,7 @@ class FcoinGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -70,6 +70,7 @@ class FcoinGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
apiSecret = str(setting['apiSecret'])
|
apiSecret = str(setting['apiSecret'])
|
||||||
|
@ -81,7 +81,7 @@ class FemasGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -91,6 +91,7 @@ class FemasGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
userID = str(setting['userID'])
|
userID = str(setting['userID'])
|
||||||
password = str(setting['password'])
|
password = str(setting['password'])
|
||||||
|
@ -61,7 +61,7 @@ class FxcmGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -71,6 +71,7 @@ class FxcmGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
port = int(setting['port'])
|
port = int(setting['port'])
|
||||||
url = str(setting['url'])
|
url = str(setting['url'])
|
||||||
|
@ -149,7 +149,7 @@ class IbGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -159,6 +159,7 @@ class IbGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
self.host = str(setting['host'])
|
self.host = str(setting['host'])
|
||||||
self.port = int(setting['port'])
|
self.port = int(setting['port'])
|
||||||
|
@ -54,7 +54,7 @@ class KsgoldGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -64,6 +64,7 @@ class KsgoldGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
accountID = str(setting['accountID'])
|
accountID = str(setting['accountID'])
|
||||||
password = str(setting['password'])
|
password = str(setting['password'])
|
||||||
|
@ -76,7 +76,7 @@ class KsotpGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -86,6 +86,7 @@ class KsotpGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
userID = str(setting['userID'])
|
userID = str(setting['userID'])
|
||||||
password = str(setting['password'])
|
password = str(setting['password'])
|
||||||
|
@ -50,7 +50,7 @@ class LbankGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -60,6 +60,7 @@ class LbankGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
secretKey = str(setting['secretKey'])
|
secretKey = str(setting['secretKey'])
|
||||||
|
@ -78,7 +78,7 @@ class LtsGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json 文件
|
# 载入json 文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -88,6 +88,7 @@ class LtsGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
userID = str(setting['userID'])
|
userID = str(setting['userID'])
|
||||||
mdPassword = str(setting['mdPassword'])
|
mdPassword = str(setting['mdPassword'])
|
||||||
|
@ -63,7 +63,7 @@ class OkexGateway(VtGateway):
|
|||||||
"""连接"""
|
"""连接"""
|
||||||
# 载入json文件
|
# 载入json文件
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -73,6 +73,7 @@ class OkexGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
apiKey = str(setting['apiKey'])
|
apiKey = str(setting['apiKey'])
|
||||||
secretKey = str(setting['secretKey'])
|
secretKey = str(setting['secretKey'])
|
||||||
|
@ -85,7 +85,7 @@ class QdpGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -95,6 +95,7 @@ class QdpGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
userID = str(setting['userID'])
|
userID = str(setting['userID'])
|
||||||
password = str(setting['password'])
|
password = str(setting['password'])
|
||||||
|
@ -82,7 +82,7 @@ class SecGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -92,6 +92,7 @@ class SecGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
accountID = str(setting['accountID'])
|
accountID = str(setting['accountID'])
|
||||||
password = str(setting['password'])
|
password = str(setting['password'])
|
||||||
|
@ -96,7 +96,7 @@ class SgitGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -106,6 +106,7 @@ class SgitGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
userID = str(setting['userID'])
|
userID = str(setting['userID'])
|
||||||
password = str(setting['password'])
|
password = str(setting['password'])
|
||||||
|
@ -77,7 +77,7 @@ class ShzdGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -87,6 +87,7 @@ class ShzdGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
frontAddress = str(setting['frontAddress'])
|
frontAddress = str(setting['frontAddress'])
|
||||||
frontPort = int(setting['frontPort'])
|
frontPort = int(setting['frontPort'])
|
||||||
|
@ -86,7 +86,7 @@ class XspeedGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -96,6 +96,7 @@ class XspeedGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
accountID = str(setting['accountID'])
|
accountID = str(setting['accountID'])
|
||||||
password = str(setting['password'])
|
password = str(setting['password'])
|
||||||
|
@ -111,7 +111,7 @@ class XtpGateway(VtGateway):
|
|||||||
def connect(self):
|
def connect(self):
|
||||||
"""连接"""
|
"""连接"""
|
||||||
try:
|
try:
|
||||||
f = file(self.filePath)
|
f = open(self.filePath)
|
||||||
except IOError:
|
except IOError:
|
||||||
log = VtLogData()
|
log = VtLogData()
|
||||||
log.gatewayName = self.gatewayName
|
log.gatewayName = self.gatewayName
|
||||||
@ -121,6 +121,7 @@ class XtpGateway(VtGateway):
|
|||||||
|
|
||||||
# 解析json文件
|
# 解析json文件
|
||||||
setting = json.load(f)
|
setting = json.load(f)
|
||||||
|
f.close()
|
||||||
try:
|
try:
|
||||||
userID = str(setting['userID'])
|
userID = str(setting['userID'])
|
||||||
password = str(setting['password'])
|
password = str(setting['password'])
|
||||||
|
Loading…
Reference in New Issue
Block a user