diff options
author | Tim Newsome <tim@sifive.com> | 2022-10-20 15:34:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-20 15:34:11 -0700 |
commit | 1d03f2a827f2a37f7d7b65218ef679fbafc797da (patch) | |
tree | a11cf635976201b25b949dd221bcd703e550bbd3 /debug | |
parent | 90d1637f8c934b218c0e0f98c942b4d60cef97e2 (diff) | |
parent | 52851b144f6be25ad91ec600ad96fa80d8b6043a (diff) | |
download | riscv-tests-1d03f2a827f2a37f7d7b65218ef679fbafc797da.zip riscv-tests-1d03f2a827f2a37f7d7b65218ef679fbafc797da.tar.gz riscv-tests-1d03f2a827f2a37f7d7b65218ef679fbafc797da.tar.bz2 |
Merge pull request #421 from riscv-software-src/pylint
Fix long line to make pylint happy.
Diffstat (limited to 'debug')
-rw-r--r-- | debug/testlib.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/debug/testlib.py b/debug/testlib.py index c53ca04..682fd09 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -704,8 +704,9 @@ class Gdb: self.active_child.sendline(command) self.active_child.expect("\n", timeout=timeout) self.active_child.expect(r"\(gdb\)", timeout=timeout) + output = self.active_child.before.decode("utf-8", errors="ignore") ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])') - return ansi_escape.sub('', self.active_child.before.strip().decode("utf-8", errors="ignore")).strip() + return ansi_escape.sub('', output).strip() def interact(self): """Call this from a test at a point where you just want to interact with |