Bug 1547730 - Recognize StreamWriter exceptions for fileno() in py3 r=#build
☠☠ backed out by ee4b88439111 ☠ ☠
authorJustin Wood <Callek@gmail.com>
Mon, 15 Apr 2019 20:57:34 -0400
changeset 533014 75879e53727cca39ce05eb638b60a8516c5eb029
parent 533013 03bdcaab1623f0b867ba989663b31477f74b6d60
child 533015 2d6ba80390c8d4f09a53b89936836982baebd31f
push id11276
push userrgurzau@mozilla.com
push dateMon, 20 May 2019 13:11:24 +0000
treeherdermozilla-beta@847755a7c325 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1547730
milestone68.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 1547730 - Recognize StreamWriter exceptions for fileno() in py3 r=#build Differential Revision: https://phabricator.services.mozilla.com/D28110
python/mozbuild/mozbuild/configure/util.py
--- a/python/mozbuild/mozbuild/configure/util.py
+++ b/python/mozbuild/mozbuild/configure/util.py
@@ -3,16 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 import codecs
 import itertools
 import locale
 import logging
+import io
 import os
 import six
 import sys
 from collections import deque
 from contextlib import contextmanager
 from distutils.version import LooseVersion
 
 
@@ -94,17 +95,17 @@ class ConfigureOutputHandler(logging.Han
             return fh
 
         self._stdout = fix_encoding(stdout)
         self._stderr = fix_encoding(stderr) if stdout != stderr else self._stdout
         try:
             fd1 = self._stdout.fileno()
             fd2 = self._stderr.fileno()
             self._same_output = self._is_same_output(fd1, fd2)
-        except AttributeError:
+        except (AttributeError, io.UnsupportedOperation):
             self._same_output = self._stdout == self._stderr
         self._stdout_waiting = None
         self._debug = deque(maxlen=maxlen + 1)
         self._keep_if_debug = self.THROW
         self._queue_is_active = False
 
     @staticmethod
     def _is_same_output(fd1, fd2):