autotest: Not raise error in copying files in cleanup step.
BUG=chromium:714834
TEST=Ran unittest. Ran autotest locally.
Change-Id: I3c2d193d4fc438cd9997935d80909602480af53e
Reviewed-on: https://chromium-review.googlesource.com/486269
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
diff --git a/scheduler/drone_utility.py b/scheduler/drone_utility.py
index edec866..418cb08 100755
--- a/scheduler/drone_utility.py
+++ b/scheduler/drone_utility.py
@@ -409,7 +409,11 @@
link_to = os.readlink(source_path)
os.symlink(link_to, destination_path)
else:
- shutil.copy(source_path, destination_path)
+ try:
+ shutil.copy(source_path, destination_path)
+ except IOError:
+ # Ignore copy error following the same above reason.
+ pass
def _same_file(self, source_path, destination_path):