diff options
author | Tim Newsome <tim@sifive.com> | 2023-05-25 10:05:41 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2023-05-25 10:05:41 -0700 |
commit | af242299624f602d380985d9850cf7d433e11840 (patch) | |
tree | f4d4d3c88549ea96daa812799f67824476a46afd /debug/targets.py | |
parent | 557762fc480fdbd2bc06a0b045cf0d6e12dbdfd4 (diff) | |
download | riscv-tests-af242299624f602d380985d9850cf7d433e11840.zip riscv-tests-af242299624f602d380985d9850cf7d433e11840.tar.gz riscv-tests-af242299624f602d380985d9850cf7d433e11840.tar.bz2 |
debug: New pylint => new warnings => new cleanups
- Replace general "Exception" with "GdbServerError" in gdbserver.py for when no
samples are collected
- Replace general "Exception" with "TargetsException" in targets.py for XLEN
mismatch
- Introduce "TestLibError" exception in testlib.py and replace general
exceptions in various locations
- Update pylint.rc to remove overgeneral-exceptions warning
Diffstat (limited to 'debug/targets.py')
-rw-r--r-- | debug/targets.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/debug/targets.py b/debug/targets.py index ddd39d5..0ba12db 100644 --- a/debug/targets.py +++ b/debug/targets.py @@ -256,6 +256,9 @@ def add_target_options(parser): "the same time. This may make it harder to debug a failure if it " "does occur.") +class TargetsException(Exception): + pass + def target(parsed): directory = os.path.dirname(parsed.target) filename = os.path.basename(parsed.target) @@ -278,7 +281,7 @@ def target(parsed): if h.xlen == 0: h.xlen = parsed.xlen elif h.xlen != parsed.xlen: - raise Exception("The target hart specified an XLEN of " + raise TargetsException("The target hart specified an XLEN of " f"{h.xlen}, but the command line specified an XLEN of " f"{parsed.xlen}. They must match.") |