-def _conv(fnct, value, fieldname):
- """Internal function.
- Like one of the to_xxx functions (e.g. to_bool), but adds the field name to the error message"""
- try: return fnct(value)
- except formencode.Invalid as e: raise formencode.Invalid(u"Conversion error in field '%s': %s" % (fieldname, unicode(e)), e.value, e.state)
-
-
class RodelbahnboxDictConverter(formencode.Validator):
"""Converts a dict with Rodelbahnbox properties to a Sledrun class. Does no validation."""
class RodelbahnboxDictConverter(formencode.Validator):
"""Converts a dict with Rodelbahnbox properties to a Sledrun class. Does no validation."""