fix: 解决文件路径读取错误的问题;解决读取token时自带换行符的问题

This commit is contained in:
2022-12-14 16:44:48 +08:00
parent 4721805989
commit 52c246cf07
3 changed files with 10 additions and 4 deletions

View File

@ -1,7 +1,9 @@
import yaml
import os
def loadYaml(path):
file = open(path, encoding='utf-8')
currentPath = os.path.dirname(__file__)
file = open(os.path.join(currentPath, path), encoding='utf-8')
configData = file.read()
file.close()