diff options
author | Tom Rini <trini@konsulko.com> | 2021-11-29 12:00:57 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-11-29 12:00:57 -0500 |
commit | 2402c93130c09b881f9cc1369459fb49d9fa0f74 (patch) | |
tree | b98fcb4632c62e8693d8ee1acfa3af55c52f634a /test/py/multiplexed_log.py | |
parent | c087b5ad974441d1408c028eb7087d86b6d127e9 (diff) | |
parent | ade37460a944aed36ae6ee634c4d4a9a22690461 (diff) |
Merge tag 'v2022.01-rc3' into next
Prepare v2022.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'test/py/multiplexed_log.py')
-rw-r--r-- | test/py/multiplexed_log.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/py/multiplexed_log.py b/test/py/multiplexed_log.py index 6688207fb3..5e79075f2e 100644 --- a/test/py/multiplexed_log.py +++ b/test/py/multiplexed_log.py @@ -2,8 +2,10 @@ # Copyright (c) 2015 Stephen Warren # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. -# Generate an HTML-formatted log file containing multiple streams of data, -# each represented in a well-delineated/-structured fashion. +""" +Generate an HTML-formatted log file containing multiple streams of data, +each represented in a well-delineated/-structured fashion. +""" import datetime import html @@ -180,7 +182,7 @@ class RunAndLog(object): raise exception return output -class SectionCtxMgr(object): +class SectionCtxMgr: """A context manager for Python's "with" statement, which allows a certain portion of test code to be logged to a separate section of the log file. Objects of this type should be created by factory functions in the Logfile @@ -208,7 +210,7 @@ class SectionCtxMgr(object): def __exit__(self, extype, value, traceback): self.log.end_section(self.marker) -class Logfile(object): +class Logfile: """Generates an HTML-formatted log file containing multiple streams of data, each represented in a well-delineated/-structured fashion.""" @@ -322,8 +324,8 @@ $(document).ready(function () { # The set of characters that should be represented as hexadecimal codes in # the log file. _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)}) + _nonprint.update(c for c in range(0, 32) if c not in (9, 10)) + _nonprint.update(range(127, 256)) def _escape(self, data): """Render data format suitable for inclusion in an HTML document. |