struct: fix exception in StructProxy
This commit is contained in:
parent
6a4cdae3a1
commit
7ee5d565bc
|
@ -25,7 +25,10 @@ class StructProxy:
|
|||
|
||||
def __getattr__(self, name: str) -> VarExpr:
|
||||
e = VarExpr(name)
|
||||
self._sx_fields_[name].append(e)
|
||||
try:
|
||||
self._sx_fields_[name].append(e)
|
||||
except KeyError:
|
||||
raise AttributeError(name) from None
|
||||
return e
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue