server/sources/__init__.py
changeset 9292 4b3e657d17ab
parent 9180 13ed6de41774
child 9445 65d93a4fd11c
child 9492 c7fc56eecd1a
equal deleted inserted replaced
9291:4894bb92558a 9292:4b3e657d17ab
   181                 msg = _('specifying %s is mandatory' % optname)
   181                 msg = _('specifying %s is mandatory' % optname)
   182                 raise ValidationError(eid, {role_name('config', 'subject'): msg})
   182                 raise ValidationError(eid, {role_name('config', 'subject'): msg})
   183             elif value is not None:
   183             elif value is not None:
   184                 # type check
   184                 # type check
   185                 try:
   185                 try:
   186                     value = configuration.convert(value, optdict, optname)
   186                     value = configuration._validate(value, optdict, optname)
   187                 except Exception as ex:
   187                 except Exception as ex:
   188                     msg = unicode(ex) # XXX internationalization
   188                     msg = unicode(ex) # XXX internationalization
   189                     raise ValidationError(eid, {role_name('config', 'subject'): msg})
   189                     raise ValidationError(eid, {role_name('config', 'subject'): msg})
   190             processed[optname] = value
   190             processed[optname] = value
   191         # cw < 3.10 bw compat
   191         # cw < 3.10 bw compat