Revision 787
Added by Aaron Marcuse-Kubitza almost 13 years ago
lib/xml_func.py | ||
---|---|---|
13 | 13 |
return [(name, func(value)) for name, value in items] |
14 | 14 |
|
15 | 15 |
def conv_items(type_, items): |
16 |
try: return map_items(type_, items) |
|
17 |
except ValueError, e: raise SyntaxException(e) |
|
16 |
def conv(val): |
|
17 |
try: return type_(val) |
|
18 |
except ValueError, e: raise SyntaxException(e) |
|
19 |
return map_items(conv, items) |
|
18 | 20 |
|
19 | 21 |
def alt(items): |
20 | 22 |
items = list(items) |
Also available in: Unified diff
xml_func.py: conv_items(): Only trap type conversion errors, not errors in map_items(). A previous bug incorrectly interpreted an error caught by map_items() as a SyntaxException.