Make wait_for_status robust against multiple calls at different times.
This change removes the dependency between wait_for_status? and
download? by checking for the staged directory if there is the
equivalent of a "cache" miss from the downloader_dict.
I also clean up a previous assumption in the downlaoder.
BUG=chromium-os:27285
TEST=Unittests + download followed by wait_for_status with
same archive_url and different. Got all expected results.
Also ran pylint on both devserver and downloader and fixed a cpl
bugs it caught.
Change-Id: I8c187cd64e40c12442de3e4be8fd4c12db7958f3
Reviewed-on: https://gerrit.chromium.org/gerrit/19263
Commit-Ready: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
diff --git a/devserver_util.py b/devserver_util.py
index c05ec41..fa92a97 100644
--- a/devserver_util.py
+++ b/devserver_util.py
@@ -151,7 +151,7 @@
"""
build_dir = os.path.join(static_dir, tag)
if not SafeSandboxAccess(static_dir, build_dir):
- raise DevServerUtilError('Invaid tag "%s".' % tag)
+ raise DevServerUtilError('Invalid tag "%s".' % tag)
try:
os.makedirs(build_dir)