mirror of
https://github.com/darkclip/netlist.git
synced 2026-11-19 20:55:28 +08:00
update
This commit is contained in:
1 parent
93e17c23f4
commit
fce66f4725
2 files changed
+6
-4
No files matched your search
+3
-2
@@ -129,10 +129,11 @@ def run(args: argparse.Namespace) -> None:
|
||||
print(line, end='')
|
||||
else:
|
||||
output_file = output.resolve()
|
||||
if not output_file.parent.exists():
|
||||
output_file.parent.mkdir(parents=True)
|
||||
if output_file.is_dir():
|
||||
print('Can not write to directory.')
|
||||
sys.exit(1)
|
||||
if not output_file.parent.exists():
|
||||
output_file.parent.mkdir(parents=True)
|
||||
if output_file.exists():
|
||||
with output_file.open('a', encoding='utf-8') as wfp:
|
||||
wfp.writelines(output_lines)
|
||||
|
||||
Reference in new issue
Block a user