mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-07 07:02:53 +03:00
substitute surrogates in log file (#8076)
Summary:
Pull Request resolved: https://github.com/facebookincubator/resctl/pull/8076
D26025779 (2b96889a0f
) may have broken the getdeps build when logging
surrogates. Use errors=surrogateescape to try to avoid that.
Reviewed By: danobi
Differential Revision: D26079717
fbshipit-source-id: 98d938bfced417e0b39a6dcddb241225ffb69c06
This commit is contained in:
committed by
Facebook GitHub Bot
parent
60d355fb1c
commit
80c039dfc5
@@ -51,7 +51,7 @@ def run_cmd(cmd, env=None, cwd=None, allow_fail=False, log_file=None):
|
|||||||
sys.stdout.buffer.write(msg.encode(errors="surrogateescape"))
|
sys.stdout.buffer.write(msg.encode(errors="surrogateescape"))
|
||||||
|
|
||||||
if log_file is not None:
|
if log_file is not None:
|
||||||
with open(log_file, "a", encoding="utf-8") as log:
|
with open(log_file, "a", encoding="utf-8", errors="surrogateescape") as log:
|
||||||
|
|
||||||
def log_function(msg):
|
def log_function(msg):
|
||||||
log.write(msg)
|
log.write(msg)
|
||||||
|
Reference in New Issue
Block a user