Skip to content

Commit

Permalink
Generalize missing tool handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Dec 31, 2023
1 parent 5336d89 commit e585404
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion indra/literature/pubmed_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ def get_all_ids(search_term):
"""
cmd = f'esearch -db pubmed -query "{search_term}" | efetch -format uid'
res = subprocess.getoutput(cmd)
if not isinstance(res, str) or "esearch: command not found" in res:
if not isinstance(res, str) or "not found" in res:
raise RuntimeError("The esearch utility could not be found. "
"This function only works if edirect is "
"installed and is visible on your PATH. "
Expand Down

0 comments on commit e585404

Please sign in to comment.