autoupdate: Use correct nebraska.Request attributes
event_type and event_results are properties of RequestApp not the
Request itself. This patch fixes it.
BUG=chromium:1014807
TEST=devserver_integration_test.py
Change-Id: Ic0847ea198a4b0058c0e8cd46bd1c5e2f8d3ccc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/1864310
Tested-by: Amin Hassani <ahassani@chromium.org>
Auto-Submit: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>
Commit-Queue: Keith Haddow <haddowk@chromium.org>
diff --git a/autoupdate.py b/autoupdate.py
index 209ef4e..bbc4b6c 100644
--- a/autoupdate.py
+++ b/autoupdate.py
@@ -319,9 +319,10 @@
self._LogRequest(request)
if request.request_type == nebraska.Request.RequestType.EVENT:
- if ((request.event_type ==
- nebraska.Request.EVENT_TYPE_UPDATE_DOWNLOAD_STARTED) and
- request.event_result == nebraska.Request.EVENT_RESULT_SUCCESS):
+ if (request.app_requests[0].event_type ==
+ nebraska.Request.EVENT_TYPE_UPDATE_DOWNLOAD_STARTED and
+ request.app_requests[0].event_result ==
+ nebraska.Request.EVENT_RESULT_SUCCESS):
with self._update_count_lock:
if self.max_updates == 0:
_Log('Received too many download_started notifications. This '