Skip to content

Commit

Permalink
Merge pull request #389 from kjsanger/fix/iquest-workaround
Browse files Browse the repository at this point in the history
Work around iquest's bad behaviour
  • Loading branch information
kjsanger authored Nov 5, 2024
2 parents ae26fc6 + 2ebb258 commit bfcf697
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/npg_irods/ont.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,17 @@ def find_run_collections(
)

# iquest mixes logging and data in its output
ignore = f"Zone is {zone}" if zone is not None else "Zone is"
ignore1 = f"Zone is {zone}" if zone is not None else "Zone is"
ignore2 = "CAT_NO_ROWS_FOUND"

return [
Collection(p)
for p in iquest(*args, query).splitlines()
if not p.strip().startswith(ignore)
]
paths = []
for line in iquest(*args, query).splitlines():
p = line.strip()
if p.startswith(ignore1) or p.startswith(ignore2):
continue
paths.append(p)

return [Collection(p) for p in paths]


def tag_index_from_id(tag_identifier: str) -> int:
Expand Down

0 comments on commit bfcf697

Please sign in to comment.