hdl.rec: unbreak hasattr(rec, ...).
authorwhitequark <cz@m-labs.hk>
Mon, 3 Jun 2019 07:16:09 +0000 (07:16 +0000)
committerwhitequark <cz@m-labs.hk>
Mon, 3 Jun 2019 07:43:31 +0000 (07:43 +0000)
commit073d3afc5f26e9925e807ee4687aaaeb43fc6196
tree17054ac7ec395a0f7017eff10f6ce904cb9d84a3
parent8471a04de9449b8cfb1641c893b240e5f7cb69be
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