mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1630426 - mach should log to stderr if not logging to a file, r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D71107 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ed805470e3
commit
6caaf2e39b
@ -28,9 +28,9 @@ def _wrap_stdstream(fh):
|
||||
encoding = sys.getdefaultencoding()
|
||||
encoding = 'utf-8' if encoding in ('ascii', 'charmap') else encoding
|
||||
if six.PY2:
|
||||
return codecs.getwriter(encoding)(sys.stdout, errors='replace')
|
||||
return codecs.getwriter(encoding)(fh, errors='replace')
|
||||
else:
|
||||
return codecs.getwriter(encoding)(sys.stdout.buffer,
|
||||
return codecs.getwriter(encoding)(fh.buffer,
|
||||
errors='replace')
|
||||
else:
|
||||
return fh
|
||||
|
Loading…
Reference in New Issue
Block a user