Пример #1
0
 def validate(self):
     super(Type, self).validate()
     if re.match("v([\d]+)", self._value):
         raise FieldValueError(
             "Value %s Looks to be a version and not a TAG" % self._value)
     elif not re.match("[A-Za-z0-9]+$", self._value):
         raise FieldValueError(
             "Value %s uses a non authorized character (only a->Z and 0->9)"
             % self._value)
Пример #2
0
 def increment(self):
     if not re.match("v([\d]+)", self._value):
         raise FieldValueError("Value %s is not a v@@' % self._value")
     self._value = "v%02i" % (
         int(re.match("v([\d]+)", self._value).group(0)) + 1)
Пример #3
0
 def validate(self):
     super(Asset, self).validate()
     if not re.match("[A-Za-z0-9]+$", self._value):
         raise FieldValueError(
             "Value %s uses a non authorized character (only a->Z and 0->9)"
             % self._value)
Пример #4
0
 def validate(self):  # a LIB folder should start by LIB
     super(Lib, self).validate()
     if not self._value.startswith('LIB'):
         raise FieldValueError("Value %s is not a LIB" % self._value)
Пример #5
0
 def validate(self):  # a LIB folder should start by LIB
     super(Sequence, self).validate()
     if not self._value.startswith('S'):
         raise FieldValueError("Value %s is not a Sequence" % self._value)
Пример #6
0
 def validate(self):
     super(Frame, self).validate()
     if not self._value.isdigit():
         raise FieldValueError(
             "Value %s uses a non authorized character (only 0->9)" %
             self._value)
Пример #7
0
 def validate(self):
     super(Bank, self).validate()
     if not self._value.startswith('Bank'):
         raise FieldValueError(
             'Value %r is invalid for %r: does not starts with "Bank"' %
             (self._value, self.key))