gs: Retry failed uploads where the digest from the server doesn't match.

What likely happened is that the data was corrupted on transfer. The remote
file is deleted when that happens, so we can just retry the upload with
hopefully better results.

BUG=chromium:410604
TEST=Ran a tryjob for butterfly-paladin. Ran run_tests.

Change-Id: I881f866fc6a4a4cc5cd90c85d73b88814b3e3ba0
Reviewed-on: https://chromium-review.googlesource.com/219190
Reviewed-by: Yu-Ju Hong <yjhong@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
diff --git a/lib/gs.py b/lib/gs.py
index b02e212..853e2ad 100644
--- a/lib/gs.py
+++ b/lib/gs.py
@@ -480,6 +480,7 @@
           'ResumableDownloadException',
           'ssl.SSLError: The read operation timed out',
           'Unable to find the server',
+          'doesn\'t match cloud-supplied digest',
       )
       if any(x in error for x in RESUMABLE_ERROR_MESSAGE):
         # Only remove the tracker files if we try to upload/download a file.