From b81839bf1af0901522cc6a706e54a04b1b3c7235 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Fri, 23 Dec 2016 11:14:18 +0100 Subject: [PATCH] Raise AttributeError. Makes hasattr work correctly. --- litex/soc/tools/remote/csr_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litex/soc/tools/remote/csr_builder.py b/litex/soc/tools/remote/csr_builder.py index 07edc61e..1bbb54a7 100644 --- a/litex/soc/tools/remote/csr_builder.py +++ b/litex/soc/tools/remote/csr_builder.py @@ -14,7 +14,7 @@ class CSRElements: return self.__dict__[attr] except KeyError: pass - raise KeyError("No such element " + attr) + raise AttributeError("No such element " + attr) class CSRRegister: -- 2.30.2