Bug 1218763 - Antivirus should retry on SSLError. r=nthomas a=lizzard DONTBUILD
authorRail Aliiev <rail@mozilla.com>
Wed, 28 Oct 2015 20:28:07 -0400
changeset 296640 f2f176ef9b45
parent 296639 40ae04af867c
child 296641 6a65996ee241
push id5268
push userraliiev@mozilla.com
push date2015-11-04 13:08 +0000
treeherdermozilla-beta@f2f176ef9b45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnthomas, lizzard
Bug 1218763 - Antivirus should retry on SSLError. r=nthomas a=lizzard DONTBUILD
--- a/testing/mozharness/scripts/release/antivirus.py
+++ b/testing/mozharness/scripts/release/antivirus.py
@@ -127,16 +127,17 @@ class AntivirusScan(BaseScript, Virtuale
         self.download_file(remote_file, file_name="extract_and_run_command.py")
     def get_files(self):
         """Pull the candidate files down from S3 for scanning, using parallel requests"""
         from boto.s3.connection import S3Connection
         from boto.exception import S3CopyError, S3ResponseError
         from redo import retry
+        from httplib import HTTPException
         # suppress boto debug logging, it's too verbose with --loglevel=debug
         import logging
         self.info("Connecting to S3")
         conn = S3Connection(anon=True)
         self.info("Getting bucket {}".format(self.config["bucket_name"]))
@@ -151,17 +152,17 @@ class AntivirusScan(BaseScript, Virtuale
             source, destination = item
             self.info("Downloading {} to {}".format(source, destination))
             key = bucket.get_key(source)
             return retry(key.get_contents_to_filename,
                          args=(destination, ),
                          sleeptime=5, max_sleeptime=60,
                          retry_exceptions=(S3CopyError, S3ResponseError,
-                                           IOError))
+                                           IOError, HTTPException))
         def find_release_files():
             candidates_prefix = self._get_candidates_prefix()
             self.info("Getting key names from candidates")
             for key in bucket.list(prefix=candidates_prefix):
                 keyname = key.name
                 if self._matches_exclude(keyname):
                     self.debug("Excluding {}".format(keyname))