From 7ff6028c9f14ac3063b09218c99233a8fc9803a4 Mon Sep 17 00:00:00 2001 From: Jannis Speer Date: Sat, 23 Mar 2024 17:12:17 +0100 Subject: [PATCH] Removing single quotes from job argument (#5) --- snakemake_executor_plugin_htcondor/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/snakemake_executor_plugin_htcondor/__init__.py b/snakemake_executor_plugin_htcondor/__init__.py index c9379ad..852d884 100644 --- a/snakemake_executor_plugin_htcondor/__init__.py +++ b/snakemake_executor_plugin_htcondor/__init__.py @@ -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,