def fromUnicode(self, u): name = str(u.strip()) # special case, mostly for interfaces if name == '*': return None try: value = self.context.resolve(name) except ConfigurationError as v: raise ValidationError(v) self.validate(value) return value
def fromUnicode(self, u): name = str(u.strip()) # special case, mostly for interfaces if name == '*': return None try: value = self.context.resolve(name) except ConfigurationError as v: raise ValidationError(v) self.validate(value) return value
def fromUnicode(self, u): u = u.strip() if u: vt = self.value_type.bind(self.context) values = [] for s in u.split(): try: v = vt.fromUnicode(s) except ValidationError as v: raise InvalidToken("%s in %s" % (v, u)) else: values.append(v) else: values = [] self.validate(values) return values
def fromUnicode(self, u): u = u.strip() if u: vt = self.value_type.bind(self.context) values = [] for s in u.split(): try: v = vt.fromUnicode(s) except ValidationError as v: raise InvalidToken("%s in %s" % (v, u)) else: values.append(v) else: values = [] self.validate(values) return values
def fromUnicode(self, u): return u.strip()
def fromUnicode(self, u): u = u.strip() if os.path.isabs(u): return os.path.normpath(u) return self.context.path(u)
def fromUnicode(self, u): return u.strip()
def fromUnicode(self, u): u = u.strip() if os.path.isabs(u): return os.path.normpath(u) return self.context.path(u)