Bug 1320938 - Backout debugging code from 42722bb6b23c. r=dustin draft
authorArmen Zambrano <armenzg@mozilla.com>
Tue, 29 Nov 2016 08:48:00 -0500
changeset 445339 9e31ea3cdf729811492fe122e445fbaae00b3820
parent 445303 f8107cf961444a8d7fdc2c0f446238af9893f875
child 538495 532ab15795529c2cb1ba5b9c1cb8ec856856d72d
push id37487
push userbmo:armenzg@mozilla.com
push dateTue, 29 Nov 2016 13:49:44 +0000
reviewersdustin
bugs1320938
milestone53.0a1
Bug 1320938 - Backout debugging code from 42722bb6b23c. r=dustin MozReview-Commit-ID: 4bu7ZAEiae1
testing/mozharness/mozharness/base/script.py
--- a/testing/mozharness/mozharness/base/script.py
+++ b/testing/mozharness/mozharness/base/script.py
@@ -389,21 +389,16 @@ class ScriptMixin(PlatformMixin):
         # * Bug 1301807 - BadStatusLine: ''
         #
         # Bug 1309912 - Adding timeout in hopes to solve blocking on response.read() (bug 1300413)
         response = urllib2.urlopen(request, timeout=30)
 
         if parsed_url.scheme in ('http', 'https'):
             expected_file_size = int(response.headers.get('Content-Length'))
 
-        self.info('Http code: {}'.format(response.getcode()))
-        for k in sorted(response.headers.keys()):
-            if k.lower().startswith('x-amz-') or k in ('Content-Encoding', 'Content-Type', 'via'):
-                self.info('{}: {}'.format(k, response.headers.get(k)))
-
         file_contents = response.read()
         obtained_file_size = len(file_contents)
         self.info('Expected file size: {}'.format(expected_file_size))
         self.info('Obtained file size: {}'.format(obtained_file_size))
 
         if obtained_file_size != expected_file_size:
             raise FetchedIncorrectFilesize(
                 'The expected file size is {} while we got instead {}'.format(
@@ -683,19 +678,18 @@ class ScriptMixin(PlatformMixin):
         )
 
         # 2) We're guaranteed to have download the file with error_level=FATAL
         #    Let's unpack the file
         function, kwargs = _determine_extraction_method_and_kwargs(url)
         try:
             function(**kwargs)
         except zipfile.BadZipfile:
-            # Bug 1306189 - Sometimes a good download turns out to be a
-            # corrupted zipfile. Let's create a signature that is easy to match
-            self.fatal('Check bug 1306189 for details on downloading a truncated zip file.')
+            # Dump the exception and exit
+            self.exception(level=FATAL)
 
 
     def load_json_url(self, url, error_level=None, *args, **kwargs):
         """ Returns a json object from a url (it retries). """
         contents = self._retry_download(
             url=url, error_level=error_level, *args, **kwargs
         )
         return json.loads(contents.read())