修复路径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()
|
t,d = gettm()
|
||||||
|
|
||||||
p = '/'.join(['trlog',d])
|
p = '/'.join(['./trlog',d])
|
||||||
if not os.path.exists(p):
|
if not os.path.exists(p):
|
||||||
os.makedirs(p)
|
os.makedirs(p)
|
||||||
|
|
||||||
l=f"{'[R]' if isR else '[T]'} - {t} --- {data}\n"
|
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.write(l)
|
||||||
f.close
|
f.close
|
||||||
|
|
||||||
@ -575,9 +575,9 @@ CCID:{pp[self.request].decode()}
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
_,t = gettm()
|
_,t = gettm()
|
||||||
if not os.path.exists('debug'):
|
if not os.path.exists('./debug'):
|
||||||
os.mkdir('debug')
|
os.mkdir('./debug')
|
||||||
logger.add('/'.join(['debug',t,'/log_{time}.log']))
|
logger.add('/'.join(['./debug',t,'/log_{time}.log']))
|
||||||
# load_cache
|
# load_cache
|
||||||
if load_cache():
|
if load_cache():
|
||||||
cache = load_cache()
|
cache = load_cache()
|
||||||
|
Loading…
Reference in New Issue
Block a user