From cef1c5d3afff6d8feeb04487ba4b30a385917d68 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 9 Jan 2012 15:17:24 +0100 Subject: [PATCH] record: better exception code --- migen/corelogic/record.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migen/corelogic/record.py b/migen/corelogic/record.py index 59b5cc2d..e3862c34 100644 --- a/migen/corelogic/record.py +++ b/migen/corelogic/record.py @@ -42,8 +42,8 @@ class Record: pos_fields = fields for hop in path: pos_self = getattr(pos_self, hop) + lu = list(filter(lambda x: x[0] == hop, pos_fields)) try: - lu = list(filter(lambda x: x[0] == hop, pos_fields)) pos_fields = lu[0][1] except IndexError: n = [] -- 2.30.2