pushimage: ignore files that do not exist
The old pushimage script would ignore source files that did not exist.
Make sure we do the same (at least for now).
BUG=chromium:327571
TEST=`pushimage -M --board=stumpy gs://chromeos-image-archive/stumpy-release/R34-5254.0.0` works
TEST=`./scripts/pushimage_unittest.py` passes
Change-Id: I09c2907979d5088976da1620b16d7109105a7383
Reviewed-on: https://chromium-review.googlesource.com/183200
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/pushimage.py b/scripts/pushimage.py
index 51ae951..96fce70 100644
--- a/scripts/pushimage.py
+++ b/scripts/pushimage.py
@@ -288,7 +288,11 @@
dst = src
elif sfx:
dst += '.%s' % sfx
- ctx.Copy(os.path.join(src_path, src), os.path.join(dst_path, dst))
+ try:
+ ctx.Copy(os.path.join(src_path, src), os.path.join(dst_path, dst))
+ except gs.GSNoSuchKey:
+ cros_build_lib.Warning('Skipping %s as it does not exist', src)
+ continue
if image_type:
dst_base = dst[:-(len(sfx) + 1)]