aboutsummaryrefslogtreecommitdiff
path: root/test/py/multiplexed_log.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-11-26 17:10:53 -0500
committerTom Rini <trini@konsulko.com>2021-11-26 17:10:53 -0500
commit693650b15d04cd5a5861bd3136c9ed9e23f95c41 (patch)
treeb4a3b3ca5d9b6b6f10e3d6880f1caa17219776c2 /test/py/multiplexed_log.py
parent2ad8d0cb950da2233a2ec030533f4e54c6d04126 (diff)
parent2b5e7108594d4e100c88f44353d1fed6456d6471 (diff)
Merge tag 'efi-2022-01-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-01-rc3-2 Test: * fix pylint warnings UEFI: * disable interrupts before removing devices in ExitBootServices() * implement poweroff in efi_system_reset() on sandbox * allow booting via EFI even if some block device fails
Diffstat (limited to 'test/py/multiplexed_log.py')
-rw-r--r--test/py/multiplexed_log.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/py/multiplexed_log.py b/test/py/multiplexed_log.py
index 545a774302..442edada12 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
@@ -178,7 +180,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
@@ -206,7 +208,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."""
@@ -320,8 +322,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.