fix: hash gen scripts allow dir exists.

Signed-off-by: TaowerfulMAX <liurantao@huawei.com>
This commit is contained in:
TaowerfulMAX 2024-03-29 10:51:39 +08:00
parent 5640ded2e6
commit 91261692f0

View File

@ -42,7 +42,7 @@ def write_output_file():
if output_dir == "":
return
if not os.path.exists(output_dir):
os.makedirs(output_dir)
os.makedirs(output_dir, exist_ok=True)
with open("{}{}".format(output_dir, output_file_name), 'w') as fd_struct:
for i in struct_vals:
fd_struct.write(i)