Skip to content

Commit

Permalink
Merge pull request #705 from lsst/tickets/DM-40032
Browse files Browse the repository at this point in the history
DM-40032: Issue warning from caller code
  • Loading branch information
timj authored Aug 3, 2023
2 parents 4443a21 + effbe39 commit 974b69c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions python/lsst/afw/image/_exposureSummaryStats.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,13 @@ def _read(bytes):
yamlDict.pop(_field)
if len(droppedFields) > 0:
droppedFieldString = ", ".join([str(f) for f in droppedFields])
plural = "s" if len(droppedFields) != 1 else ""
them = "them" if len(droppedFields) > 1 else "it"
warnings.warn(
(
f"Could not read summary fields [{droppedFieldString}]. "
"Please use a newer stack."
),
f"Summary field{plural} [{droppedFieldString}] not recognized by this software version;"
f" ignoring {them}.",
FutureWarning,
stacklevel=2,
)
return ExposureSummaryStats(**yamlDict)

Expand Down

0 comments on commit 974b69c

Please sign in to comment.