修复路径bug
This commit is contained in:
parent
3467a48070
commit
659668db2b
10
server.py
10
server.py
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user