hdl.rec: unbreak hasattr(rec, ...).
authorwhitequark <whitequark@whitequark.org>
Mon, 3 Jun 2019 07:16:09 +0000 (07:16 +0000)
committerwhitequark <whitequark@whitequark.org>
Mon, 3 Jun 2019 07:43:31 +0000 (07:43 +0000)
commita1940c552829ff31b499a4e6b28a86543e6a455f
tree17054ac7ec395a0f7017eff10f6ce904cb9d84a3
parent6fae06aea9b73b0f2080b8e4d317c6c02163b0d7
hdl.rec: unbreak hasattr(rec, ...).

hasattr() requires that AttributeError be raised. Change __getitem__
to raise AttributeError, too, since it is fundamentally just sugar
for getattr().
nmigen/hdl/rec.py
nmigen/test/test_hdl_rec.py