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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user