Skip to content

Commit da670ce

Browse files
author
Nolan Woods
committed
Skip outputting stats if JMESPath does not generate records
1 parent 77e365b commit da670ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

biopython_convert/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def _print_stats(record, stats):
213213
:param stats: IO handle or None
214214
:return: record, unaltered
215215
"""
216-
if stats:
216+
if stats and isinstance(record, SeqIO.SeqRecord):
217217
print(to_stats(record), file=stats)
218218
return record
219219

0 commit comments

Comments
 (0)