Skip to content

Commit

Permalink
add quotes for file/folder names to avoid confusion for file/folder w…
Browse files Browse the repository at this point in the history
…ith spaces
  • Loading branch information
hsnfirooz committed Nov 1, 2024
1 parent 8e4627d commit c4c3554
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def submit_dir(args: Namespace, job_name: Path):
)

# Log
print(f"Results will be written to folder: {output_dir}\n")
print(f"Results will be written to folder: \"{output_dir}\"\n")

# Submit
cmd = f"sbatch {tmp_file_sh.absolute()}"
Expand Down Expand Up @@ -440,7 +440,7 @@ def submit_file(args: Namespace, job_name: Path):
)

# Log
print(f"Results will be written to folder: {output_dir}\n")
print(f"Results will be written to folder: \"{output_dir}\"\n")

# Submit
cmd = f"sbatch {tmp_file_sh.absolute()}"
Expand Down Expand Up @@ -515,7 +515,7 @@ def main():

print(f"\nSubmit speech2text jobs with arguments:")
for key, value in vars(args).items():
print(f"\t{key}: {value}")
print(f"\t{key}: \"{value}\"")
print()

# Check temporary folder
Expand Down Expand Up @@ -553,17 +553,17 @@ def main():

# Notify about temporary folder location
print(
f"Log files (.out) and batch submit scripts (.sh) will be written to: {args.SPEECH2TEXT_TMP}\n"
f"Log files (.out) and batch submit scripts (.sh) will be written to: \"{args.SPEECH2TEXT_TMP}\"\n"
)

# Submit file or directory
args.INPUT = Path(args.INPUT).absolute()
job_name = parse_job_name(args.INPUT)
if Path(args.INPUT).is_file():
print(f"Input file: {args.INPUT}\n")
print(f"Input file: \"{args.INPUT}\"\n")
submit_file(args, job_name)
elif Path(args.INPUT).is_dir():
print(f"Input directory: {args.INPUT}\n")
print(f"Input directory: \"{args.INPUT}\"\n")
submit_dir(args, job_name)
else:
print(
Expand Down

0 comments on commit c4c3554

Please sign in to comment.