diff --git a/python/mozbuild/mozbuild/action/tooltool.py b/python/mozbuild/mozbuild/action/tooltool.py index 3c68326107bd..5d5d02f9cf26 100755 --- a/python/mozbuild/mozbuild/action/tooltool.py +++ b/python/mozbuild/mozbuild/action/tooltool.py @@ -494,10 +494,9 @@ def fetch_file(base_urls, file_record, grabchunk=1024 * 4, auth_file=None, regio (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) diff --git a/testing/mozharness/external_tools/tooltool.py b/testing/mozharness/external_tools/tooltool.py index ac7da8503425..0112921eb611 100755 --- a/testing/mozharness/external_tools/tooltool.py +++ b/testing/mozharness/external_tools/tooltool.py @@ -492,10 +492,9 @@ def fetch_file(base_urls, file_record, grabchunk=1024 * 4, auth_file=None, regio (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)