Bug 1501802 - Update tooltool.py fetch_file to log.info exceptions instead of log.debug, r=garbas
authorBob Clary <bclary@bclary.com>
Sat, 10 Nov 2018 03:10:08 -0800
changeset 508522 9a627c7442337edade33176949a2565bee988666
parent 508521 cadb8d9fd21b3465cd28ac9c2b1968c700a43012
child 508523 60e0ab5a32d0fa44b5d4089d15888bf023ef1d38
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgarbas
bugs1501802
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1501802 - Update tooltool.py fetch_file to log.info exceptions instead of log.debug, r=garbas
python/mozbuild/mozbuild/action/tooltool.py
testing/mozharness/external_tools/tooltool.py
--- a/python/mozbuild/mozbuild/action/tooltool.py
+++ b/python/mozbuild/mozbuild/action/tooltool.py
@@ -489,20 +489,19 @@ def fetch_file(base_urls, file_record, g
                     out.write(indata)
                     size += len(indata)
                     if indata == '':
                         k = False
                 log.info("File %s fetched from %s as %s" %
                          (file_record.filename, base_url, temp_path))
                 fetched_path = temp_path
                 break
-        except (urllib2.URLError, urllib2.HTTPError, ValueError) as e:
+        except (urllib2.URLError, urllib2.HTTPError, ValueError):
             log.info("...failed to fetch '%s' from %s" %
-                     (file_record.filename, base_url))
-            log.debug("%s" % e)
+                     (file_record.filename, base_url), exc_info=True)
         except IOError:  # pragma: no cover
             log.info("failed to write to temporary file for '%s'" %
                      file_record.filename, exc_info=True)
 
     # cleanup temp file in case of issues
     if fetched_path:
         return os.path.split(fetched_path)[1]
     else:
--- a/testing/mozharness/external_tools/tooltool.py
+++ b/testing/mozharness/external_tools/tooltool.py
@@ -487,20 +487,19 @@ def fetch_file(base_urls, file_record, g
                     out.write(indata)
                     size += len(indata)
                     if indata == '':
                         k = False
                 log.info("File %s fetched from %s as %s" %
                          (file_record.filename, base_url, temp_path))
                 fetched_path = temp_path
                 break
-        except (urllib2.URLError, urllib2.HTTPError, ValueError) as e:
+        except (urllib2.URLError, urllib2.HTTPError, ValueError):
             log.info("...failed to fetch '%s' from %s" %
-                     (file_record.filename, base_url))
-            log.debug("%s" % e)
+                     (file_record.filename, base_url), exc_info=True)
         except IOError:  # pragma: no cover
             log.info("failed to write to temporary file for '%s'" %
                      file_record.filename, exc_info=True)
 
     # cleanup temp file in case of issues
     if fetched_path:
         return os.path.split(fetched_path)[1]
     else: