Update test.py

This commit is contained in:
p53209761 2022-10-19 16:50:40 +08:00
parent 10d0ad2367
commit 03bc080ae1
1 changed files with 5 additions and 5 deletions

10
test.py
View File

@ -5,13 +5,13 @@ import time
fake = Faker(locale="zh_CN") fake = Faker(locale="zh_CN")
def write_log(path, log): def write_log(path, loger):
with open(file=path, mode="a", encoding="utf-8") as f: with open(file=path, mode="a", encoding="utf-8") as f:
if isinstance(log, str): if isinstance(loger, str):
f.write(log) f.write(loger)
if isinstance(log, list): if isinstance(loger, list):
for line in log: for line in loger:
f.write(line) f.write(line)