Skip to content

Commit 638eb32

Browse files
Fix extension/output directory renames in argparse
1 parent 527055b commit 638eb32

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

vhdlproc/vhdlproc.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -384,22 +384,22 @@ def _cli():
384384
test_all(identifiers)
385385
return
386386

387-
if not os.path.exists(args.temp_dir):
388-
os.makedirs(args.temp_dir)
389-
390387
proc = VHDLproc()
391388
for file in args.input:
392-
if file.endswith(args.extension):
389+
if file.endswith(args.e):
393390
logging.debug(f"Skipping file {file}")
394391
continue
395392

396-
if args.out_dir is not None:
393+
if args.o is not None:
394+
if not os.path.exists(args.o):
395+
os.makedirs(args.o)
396+
397397
newfile = os.path.join(
398-
args.out_dir,
399-
os.path.splitext(os.path.basename(file))[0] + args.extension,
398+
args.o,
399+
os.path.splitext(os.path.basename(file))[0] + args.e,
400400
)
401401
else:
402-
newfile = os.path.splitext(file)[0] + args.extension
402+
newfile = os.path.splitext(file)[0] + args.e
403403

404404
print(newfile)
405405

0 commit comments

Comments
 (0)