aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/python_utils
diff options
context:
space:
mode:
authorGravatar Richard Belleville <rbellevi@google.com>2018-11-05 09:40:59 -0800
committerGravatar Richard Belleville <rbellevi@google.com>2018-11-05 09:40:59 -0800
commit35c6e5541b256d6cce1d85db64533d847c3cc1cc (patch)
tree027ef103c837d56c7cfe562f29429079c2ac686b /tools/run_tests/python_utils
parentac0904b56966fee59fd5e1f818dcf87ebca0dd0b (diff)
Restore unnecessary 2to3 change
Diffstat (limited to 'tools/run_tests/python_utils')
-rw-r--r--tools/run_tests/python_utils/report_utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/run_tests/python_utils/report_utils.py b/tools/run_tests/python_utils/report_utils.py
index bf1f7374e2..8d8dedb929 100644
--- a/tools/run_tests/python_utils/report_utils.py
+++ b/tools/run_tests/python_utils/report_utils.py
@@ -13,8 +13,6 @@
# limitations under the License.
"""Generate XML and HTML test reports."""
-
-
try:
from mako.runtime import Context
from mako.template import Template
@@ -33,7 +31,9 @@ def _filter_msg(msg, output_format):
if output_format in ['XML', 'HTML']:
# keep whitespaces but remove formfeed and vertical tab characters
# that make XML report unparseable.
- filtered_msg = [x for x in msg.decode('UTF-8', 'ignore') if x in string.printable and x != '\f' and x != '\v']
+ filtered_msg = filter(
+ lambda x: x in string.printable and x != '\f' and x != '\v',
+ msg.decode('UTF-8', 'ignore'))
if output_format == 'HTML':
filtered_msg = filtered_msg.replace('"', '&quot;')
return filtered_msg