def _parse_timestamp_and_interval(keyword, content):
 line = ('%s %s' % (keyword, content))
 content_match = _timestamp_re.match(content)
 if (not content_match):
  raise ValueError(('Malformed %s line: %s' % (keyword, line)))
 (timestamp_str, interval, remainder) = content_match.groups()
 if remainder:
  remainder = remainder[1:]
 if (not interval.isdigit()):
  raise ValueError(("%s line's interval wasn't a number: %s" % (keyword, line)))
 try:
  timestamp = stem.util.str_tools._parse_timestamp(timestamp_str)
  return (timestamp, int(interval), remainder)
 except ValueError:
  raise ValueError(("%s line's timestamp wasn't parsable: %s" % (keyword, line)))

def _parse_timestamp_and_interval ( keyword , content ) : line = ( '%s %s' % ( keyword , content ) ) content_match = _timestamp_re . match ( content ) if ( not content_match ) : raise ValueError ( ( 'Malformed %s line: %s' % ( keyword , line ) ) ) ( timestamp_str , interval , remainder ) = content_match . groups ( ) if remainder : remainder = remainder [ 1 : ] if ( not interval . isdigit ( ) ) : raise ValueError ( ( "%s line's interval wasn't a number: %s" % ( keyword , line ) ) ) try : timestamp = stem . util . str_tools . _parse_timestamp ( timestamp_str ) return ( timestamp , int ( interval ) , remainder ) except ValueError : raise ValueError ( ( "%s line's timestamp wasn't parsable: %s" % ( keyword , line ) ) )
parses a yyyy-mm-dd hh:mm:ss * entry .