File tree Expand file tree Collapse file tree
python/lsst/ctrl/mpexec/cli/script Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -371,10 +371,11 @@ def print_summary(
371371 Butler to use for the report. This is needed to get the exposure
372372 dimension records for the exception diagnostics.
373373 """
374- summary .pprint (
374+ exception_diagnostics_table = summary .pprint (
375375 brief = (brief or bool (full_output_filename ) or bool (exception_diagnostics_filename )),
376376 show_exception_diagnostics = show_exception_diagnostics ,
377377 butler = butler ,
378+ return_exception_diagnostics_table = show_exception_diagnostics and exception_diagnostics_filename ,
378379 )
379380 if full_output_filename :
380381 # Write the full summary to a file.
@@ -383,7 +384,10 @@ def print_summary(
383384 print (f"Full summary written to { full_output_filename } " )
384385
385386 if exception_diagnostics_filename :
386- exception_diagnostics_table = summary .make_exception_diagnostics_table (butler )
387+ # Create the exception diagnostics table if it wasn't created in the
388+ # previous step due to `show_exception_diagnostics` being False.
389+ if not exception_diagnostics_table :
390+ exception_diagnostics_table = summary .make_exception_diagnostics_table (butler )
387391
388392 # Check the file extension to determine the format.
389393 fmt = infer_write_format_from_filename (exception_diagnostics_filename )
You can’t perform that action at this time.
0 commit comments