Skip to content

Commit 2cc862f

Browse files
committed
🎨 improve log when cmsearch fail
1 parent 5e6bf7d commit 2cc862f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

integron_finder/infernal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ def find_attc(replicon_path, replicon_id, cmsearch_path, out_dir, model_attc, in
141141
mod_attc=model_attc.replace(' ', '\\ '),
142142
infile=replicon_path.replace(' ', '\\ '))
143143
try:
144-
_log.debug("run cmsearch: {}".format(cmsearch_cmd))
144+
_log.debug(f"run cmsearch: {cmsearch_cmd}")
145145
with open(os.devnull, 'w') as dev_null:
146146
cmd = shlex.split(cmsearch_cmd)
147147
completed_process = subprocess.run(cmd, stdout=dev_null)
148148
except Exception as err:
149-
raise RuntimeError(f"{cmd} failed : {err}")
149+
raise RuntimeError(f"{' '.join(cmd)} failed : {err}")
150150
if completed_process.returncode != 0:
151-
raise RuntimeError(f"{cmd} failed returncode = {completed_process.returncode}")
151+
raise RuntimeError(f"{' '.join(cmd)} failed returncode = {completed_process.returncode}")
152152

153153

154154
def local_max(replicon,

0 commit comments

Comments
 (0)