修复路径bug

This commit is contained in:
CSSC-WORK\murmur 2024-01-25 10:43:28 +08:00
parent 3467a48070
commit 659668db2b

View File

@ -29,12 +29,12 @@ def save2file(data,isR=1):
"""
t,d = gettm()
p = '/'.join(['trlog',d])
p = '/'.join(['./trlog',d])
if not os.path.exists(p):
os.makedirs(p)
l=f"{'[R]' if isR else '[T]'} - {t} --- {data}\n"
f=open('/'.join(['trlog',d,'trlog.txt']),'a')
f=open('/'.join(['./trlog',d,'trlog.txt']),'a')
f.write(l)
f.close
@ -575,9 +575,9 @@ CCID:{pp[self.request].decode()}
if __name__ == "__main__":
_,t = gettm()
if not os.path.exists('debug'):
os.mkdir('debug')
logger.add('/'.join(['debug',t,'/log_{time}.log']))
if not os.path.exists('./debug'):
os.mkdir('./debug')
logger.add('/'.join(['./debug',t,'/log_{time}.log']))
# load_cache
if load_cache():
cache = load_cache()