Make check-libcxx Py3-compatible.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252458 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi
2015-11-09 10:55:04 +00:00
parent 579b42b413
commit 84bdf2cbe4

View File

@@ -11,14 +11,14 @@ def trace_function(function, log_calls, log_results, label=''):
# Perform the call itself, logging before, after, and anything thrown.
try:
if log_calls:
print '{}: Calling {}'.format(label, call_str)
print('{}: Calling {}'.format(label, call_str))
res = function(*args, **kwargs)
if log_results:
print '{}: {} -> {}'.format(label, call_str, res)
print('{}: {} -> {}'.format(label, call_str, res))
return res
except Exception as ex:
if log_results:
print '{}: {} raised {}'.format(label, call_str, type(ex))
print('{}: {} raised {}'.format(label, call_str, type(ex)))
raise ex
return wrapper