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 306595 f2f176ef9b45115ba655b78f3562d3e447513d85
parent 306594 40ae04af867cbdc934f234e2b780fc6911c8de83
child 306828 7583ebfe2c86fe90d4aee9babbaf400debe7b2c6
child 307685 6a65996ee241add97aa0c96daf4edb4d8822a608
push id7165
push usergszorc@mozilla.com
push dateWed, 04 Nov 2015 23:15:27 +0000
reviewersnthomas, lizzard
bugs1218763
milestone43.0
Bug 1218763 - Antivirus should retry on SSLError. r=nthomas a=lizzard DONTBUILD
testing/mozharness/scripts/release/antivirus.py
--- a/testing/mozharness/scripts/release/antivirus.py
+++ b/testing/mozharness/scripts/release/antivirus.py
@@ -127,16 +127,17 @@ class AntivirusScan(BaseScript, Virtuale
                                                                                self.config["tools_revision"])
         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
         logging.getLogger('boto').setLevel(logging.INFO)
 
         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))