From: Tim 'mithro' Ansell Date: Fri, 23 Dec 2016 10:14:18 +0000 (+0100) Subject: Raise AttributeError. X-Git-Tag: 24jan2021_ls180~1908^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b81839bf1af0901522cc6a706e54a04b1b3c7235;p=litex.git Raise AttributeError. Makes hasattr work correctly. --- 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: