X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=test%2Fpy%2Fmultiplexed_log.py;h=637a3bd257ba3855604b446e94f5d571452accbc;hb=3d5ced9e22d32112a20f9dc0f5fb1f22ef088079;hp=a2cfd71746190f9e54cfc8f8f2ba40132be80e1d;hpb=b75643ad0a2429e7efc7317517b47203c3c2f7c9;p=platform%2Fkernel%2Fu-boot.git diff --git a/test/py/multiplexed_log.py b/test/py/multiplexed_log.py index a2cfd71..637a3bd 100644 --- a/test/py/multiplexed_log.py +++ b/test/py/multiplexed_log.py @@ -1,7 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2015 Stephen Warren # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. -# -# SPDX-License-Identifier: GPL-2.0 # Generate an HTML-formatted log file containing multiple streams of data, # each represented in a well-delineated/-structured fashion. @@ -315,8 +314,9 @@ $(document).ready(function () { # The set of characters that should be represented as hexadecimal codes in # the log file. - _nonprint = ('%' + ''.join(chr(c) for c in range(0, 32) if c not in (9, 10)) + - ''.join(chr(c) for c in range(127, 256))) + _nonprint = {ord('%')} + _nonprint.update({c for c in range(0, 32) if c not in (9, 10)}) + _nonprint.update({c for c in range(127, 256)}) def _escape(self, data): """Render data format suitable for inclusion in an HTML document. @@ -332,7 +332,7 @@ $(document).ready(function () { """ data = data.replace(chr(13), '') - data = ''.join((c in self._nonprint) and ('%%%02x' % ord(c)) or + data = ''.join((ord(c) in self._nonprint) and ('%%%02x' % ord(c)) or c for c in data) data = cgi.escape(data) return data