record: better exception code

This commit is contained in:
Sebastien Bourdeauducq 2012-01-09 15:17:24 +01:00
parent 89bf704b2b
commit cef1c5d3af
1 changed files with 1 additions and 1 deletions

View File

@ -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 = []