Update ctpGateway.py

add f.close()
This commit is contained in:
Tom 2018-08-26 22:46:19 +08:00 committed by GitHub
parent 8e4f9121a1
commit f605478654
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,6 +118,7 @@ class CtpGateway(VtGateway):
# 解析json文件
setting = json.load(f)
f.close()
try:
userID = str(setting['userID'])
password = str(setting['password'])
@ -1503,4 +1504,4 @@ class CtpTdApi(TdApi):