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 408b9d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 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,14 +553,14 @@ 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")
Expand Down

0 comments on commit 408b9d1

Please sign in to comment.