Skip to content

Commit

Permalink
Work around iquest's bad behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
kjsanger committed Nov 5, 2024
1 parent ad04650 commit 2ebb258
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 2ebb258

Please sign in to comment.