Bug 795670 - Don't raise exception on convertion failure. r=gps DONTBUILD (NPOTB)
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Sun, 07 Oct 2012 16:30:13 -0700
changeset 109571 729099167c99ddc85bb109e4a7f2872e4a0abc8a
parent 109570 83d38854c21e05cfd06d68b21cf836aa32fd5632
child 109581 e6df45a289022aef32c4249cd283f1d358958c15
child 109587 cf1bb42b3420f2c81392b8404ec89695c58cc8f3
push id23633
push usergszorc@mozilla.com
push dateSun, 07 Oct 2012 23:30:39 +0000
treeherdermozilla-central@729099167c99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs795670
milestone18.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 795670 - Don't raise exception on convertion failure. r=gps DONTBUILD (NPOTB)
python/mozbuild/mozbuild/base.py
--- a/python/mozbuild/mozbuild/base.py
+++ b/python/mozbuild/mozbuild/base.py
@@ -309,17 +309,17 @@ class MozbuildObject(object):
         """
         args = self._normalize_command(args, require_unix_environment)
 
         self.log(logging.INFO, 'process', {'args': args}, ' '.join(args))
 
         def handleLine(line):
             # Converts str to unicode on Python 2 and bytes to str on Python 3.
             if isinstance(line, bytes):
-                line = line.decode(sys.stdout.encoding)
+                line = line.decode(sys.stdout.encoding or 'utf-8', 'replace')
 
             if line_handler:
                 line_handler(line)
 
             if not log_name:
                 return
 
             self.log(log_level, log_name, {'line': line.strip()}, '{line}')