Skip to content

Commit

Permalink
Removing single quotes from job argument (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisspeer authored Mar 23, 2024
1 parent 4fd57cc commit 7ff6028
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions snakemake_executor_plugin_htcondor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ def run_job(self, job: JobExecutorInterface):
job_exec = self.get_python_executable()
job_args = self.format_job_exec(job).removeprefix(job_exec + " ")

# HTCondor cannot handle single quotes
if "'" in job_args:
job_args = job_args.replace("'", "")
self.logger.warning(
"The job argument contains a single quote. "
"Removing it to avoid issues with HTCondor."
)

# Creating submit dictionary which is passed to htcondor.Submit
submit_dict = {
"executable": job_exec,
Expand Down

0 comments on commit 7ff6028

Please sign in to comment.