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 pos_fields = fields
for hop in path: for hop in path:
pos_self = getattr(pos_self, hop) pos_self = getattr(pos_self, hop)
try:
lu = list(filter(lambda x: x[0] == hop, pos_fields)) lu = list(filter(lambda x: x[0] == hop, pos_fields))
try:
pos_fields = lu[0][1] pos_fields = lu[0][1]
except IndexError: except IndexError:
n = [] n = []