Example #1
0
 def _validate(self, value):
     time_tokens = utils.split_value(value)
     if not time_tokens:
         return None
     timestr = time_tokens[0]
     try:
         secs = utils.timestr_to_secs(timestr)
         time_tokens[0] = utils.secs_to_timestr(secs)
     except DataError, err:
         if not '${' in timestr:
             return str(err)
 def _validate(self, value):
     time_tokens = utils.split_value(value)
     if not time_tokens:
         return None
     timestr = time_tokens[0]
     try:
         secs = utils.timestr_to_secs(timestr)
         if secs <= 0:
             raise ValueError("Timestring must be over zero")
         time_tokens[0] = utils.secs_to_timestr(secs)
     except ValueError, err:
         if '${' not in timestr:
             return str(err)
Example #3
0
 def _validate(self, value):
     time_tokens = utils.split_value(value)
     if not time_tokens:
         return None
     timestr = time_tokens[0]
     try:
         secs = utils.timestr_to_secs(timestr)
         if secs <= 0:
             raise ValueError("Timestring must be over zero")
         time_tokens[0] = utils.secs_to_timestr(secs)
     except ValueError, err:
         if '${' not in timestr:
             return str(err)