nicknezis commented on a change in pull request #3786:
URL: https://github.com/apache/incubator-heron/pull/3786#discussion_r837024688
##########
File path: heron/tools/tracker/src/python/query_operators.py
##########
@@ -150,11 +150,11 @@ async def execute(
raise Exception(metrics["message"])
# Put a blank timeline.
- if not metrics.get("timeline"):
- metrics["timeline"] = {
+ if not metrics.timeline:
+ metrics.timeline = {
Review comment:
Interesting. I'll have to compare the tests with the code. In some
cases, `metrics` isn't a `dict`, but instead is a `MetricsTimeline` object
which doesn't have a `get()` method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]