Chromium Code Reviews| Index: dashboard/dashboard/pinpoint/models/quest/execution.py |
| diff --git a/dashboard/dashboard/pinpoint/models/quest/execution.py b/dashboard/dashboard/pinpoint/models/quest/execution.py |
| index f7a89e4a73db21fab44d9a6383813ac5263a8a0a..35428b72c379ee7b2ca326f04bf9364bacf1e1bd 100644 |
| --- a/dashboard/dashboard/pinpoint/models/quest/execution.py |
| +++ b/dashboard/dashboard/pinpoint/models/quest/execution.py |
| @@ -65,6 +65,17 @@ class Execution(object): |
| assert self.completed |
| return self._result_arguments |
| + def AsDict(self): |
| + d = { |
| + 'result_arguments': self.result_arguments if self.completed else {}, |
| + 'result_values': self.result_values if self.completed else [] |
|
dtu
2017/08/22 16:46:19
nit: else null
shatch
2017/08/22 17:01:20
Done.
|
| + } |
| + d.update(self._AsDict()) |
| + return d |
| + |
| + def _AsDict(self): |
| + raise NotImplementedError() |
| + |
| def Poll(self): |
| """Update the Execution status.""" |
| assert not self.completed |