Skip to content

Commit 3a158cd

Browse files
committed
Fix log warning for no data
1 parent 3dd690c commit 3a158cd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

python/lsst/summit/utils/efdUtils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,11 @@ def getEfdData(
286286
)
287287
if ret.empty and warn:
288288
log = logging.getLogger(__name__)
289-
log.warning(
290-
f"Topic {topic} is in the schema, but no data was returned by the query for the specified"
291-
" time range"
292-
)
289+
msg = ""
290+
if raiseIfTopicNotInSchema:
291+
f"Topic {topic} is in the schema, but "
292+
msg += "no data was returned by the query for the specified time range"
293+
log.warning(msg)
293294
return ret
294295

295296

0 commit comments

Comments
 (0)