fix: 解决文件路径读取错误的问题;解决读取token时自带换行符的问题
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
import os
|
||||
import re
|
||||
from functools import partial
|
||||
|
||||
def getTemplate(filePath):
|
||||
file = open(filePath, encoding='utf-8')
|
||||
currentPath = os.path.dirname(__file__)
|
||||
file = open(os.path.join(currentPath, filePath), encoding='utf-8')
|
||||
fileData = file.read()
|
||||
file.close()
|
||||
return fileData
|
||||
|
Reference in New Issue
Block a user