Skip to content

Commit 0483609

Browse files
authored
Merge pull request #553 from lsst/tickets/DM-54084
DM-54084: Don't try to print empty report tables.
2 parents 233a03c + 9bc1075 commit 0483609

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

doc/changes/DM-54084.bugfix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug in `butler provenance-report` that caused an exception to be raised when trying to print an empty table.

python/lsst/pipe/base/quantum_graph/_provenance.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,12 +1602,14 @@ def make_many_reports(
16021602
stream.write(status_report.model_dump_json(indent=2))
16031603
if print_quantum_table:
16041604
quantum_table = self.make_quantum_table()
1605-
quantum_table.pprint_all()
1606-
print("")
1605+
if quantum_table:
1606+
quantum_table.pprint_all()
1607+
print("")
16071608
if print_exception_table:
16081609
exception_table = self.make_exception_table()
1609-
exception_table.pprint_all()
1610-
print("")
1610+
if exception_table:
1611+
exception_table.pprint_all()
1612+
print("")
16111613

16121614

16131615
@dataclasses.dataclass

0 commit comments

Comments
 (0)