Devserver fix for bug where we don't check for the right update file.
BUG=chromium:269047
TEST=Ran it with the label workflow.
Change-Id: I3ce1689c0bd8288b94c3b9d15a0d9ffbf35f0260
Reviewed-on: https://gerrit.chromium.org/gerrit/64813
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Joy Chen <joychen@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
diff --git a/autoupdate.py b/autoupdate.py
index 7f351b5..4eac41e 100644
--- a/autoupdate.py
+++ b/autoupdate.py
@@ -734,12 +734,15 @@
rel_path = None
url = _NonePathJoin(static_urlbase, label, rel_path,
constants.UPDATE_FILE)
+ # Local path to the update file.
+ static_file_path = _NonePathJoin(static_image_dir,
+ constants.UPDATE_FILE)
if common_util.IsInsideChroot():
rel_path = self.GenerateUpdatePayload(board, client_version,
static_image_dir)
url = _NonePathJoin(static_urlbase, label, rel_path,
constants.UPDATE_FILE)
- elif not os.path.exists(url):
+ elif not os.path.exists(static_file_path):
# the update payload wasn't found. This update can't happen.
raise AutoupdateError("Failed to find an update payload at %s", url)