Update test.py
This commit is contained in:
parent
120982df55
commit
f2f95a22a7
10
test.py
10
test.py
|
@ -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, strr):
|
||||||
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(strr, str):
|
||||||
f.write(log)
|
f.write(strr)
|
||||||
|
|
||||||
if isinstance(log, list):
|
if isinstance(strr, list):
|
||||||
for line in log:
|
for line in strr:
|
||||||
f.write(line)
|
f.write(line)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue