diff --git a/CHANGELOG.md b/CHANGELOG.md index f50702d..c6a87ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ This document tracks changes to the `master` branch of the profile. - Default project and queue will be removed from the submission command if they are present in the `lsf.yaml` +### Fixed + +- Support quoted jobid from `snakemake>=v7.1.1` [[#45][45]] + ## [0.1.2] - 01/04/2021 ### Added @@ -83,6 +87,7 @@ This document tracks changes to the `master` branch of the profile. [9]: https://github.com/Snakemake-Profiles/lsf/pull/9 [36]: https://github.com/Snakemake-Profiles/lsf/issues/36 [39]: https://github.com/Snakemake-Profiles/lsf/issues/39 +[45]: https://github.com/Snakemake-Profiles/lsf/issues/45 [0.1.0]: https://github.com/Snakemake-Profiles/lsf/releases/tag/0.1.0 [0.1.1]: https://github.com/Snakemake-Profiles/lsf/releases/tag/0.1.1 [0.1.2]: https://github.com/Snakemake-Profiles/lsf/releases/tag/0.1.2 diff --git a/{{cookiecutter.profile_name}}/lsf_status.py b/{{cookiecutter.profile_name}}/lsf_status.py index 5589f44..a0d04e9 100755 --- a/{{cookiecutter.profile_name}}/lsf_status.py +++ b/{{cookiecutter.profile_name}}/lsf_status.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import shlex import sys import time from pathlib import Path @@ -198,8 +199,12 @@ def get_status(self) -> str: if __name__ == "__main__": - jobid = int(sys.argv[1]) - outlog = sys.argv[2] + # need to support quoted and unquoted jobid + # see https://github.com/Snakemake-Profiles/lsf/issues/45 + split_args = shlex.split(" ".join(sys.argv[1:])) + jobid = int(split_args[0]) + outlog = split_args[1] + if CookieCutter.get_unknwn_behaviour().lower() == "wait": kill_unknown = False elif CookieCutter.get_unknwn_behaviour().lower() == "kill":