Bug 1444597 - Stringify exception when logging harmless errors in post-build step to avoid confusing stacktrace. draft
authorChris Manchester <cmanchester@mozilla.com>
Thu, 31 May 2018 21:21:41 -0700
changeset 802558 406075e8200198d3d333f1ad6fa0362fa5225b39
parent 802557 6532eeef152d7bf3536c482a0c28c6a156f333b7
push id111910
push usercmanchester@mozilla.com
push dateFri, 01 Jun 2018 04:22:38 +0000
bugs1444597
milestone62.0a1
Bug 1444597 - Stringify exception when logging harmless errors in post-build step to avoid confusing stacktrace. MozReview-Commit-ID: 6B4WCUfjESE
python/mozbuild/mozbuild/controller/building.py
--- a/python/mozbuild/mozbuild/controller/building.py
+++ b/python/mozbuild/mozbuild/controller/building.py
@@ -1134,17 +1134,17 @@ class BuildDriver(MozbuildObject):
             try:
                 config = self.config_environment
                 active_backend = config.substs.get('BUILD_BACKENDS', [None])[0]
                 if active_backend:
                     backend_cls = get_backend_class(active_backend)(config)
                     new_status = backend_cls.post_build(self, output, jobs, verbose, status)
                     status = new_status
             except Exception as ex:
-                self.log(logging.DEBUG, 'post_build', {'ex': ex},
+                self.log(logging.DEBUG, 'post_build', {'ex': str(ex)},
                          "Unable to run active build backend's post-build step; " +
                          "failing the build due to exception: {ex}.")
                 if not status:
                     # If the underlying build provided a failing status, pass
                     # it through; otherwise, fail.
                     status = 1
 
             monitor.finish(record_usage=status == 0)