Exemplo n.º 1
0
def get_paste(key, format):
    paste = Paste.by_key(key)
    if paste is None:
        raise NotFound('No such table: %s' % key)
    etag = generate_etag(key, format)
    if request.if_none_match and request.if_none_match == etag:
        raise NotModified()
    has_header, table = False, None
    try:
        has_header, table = parse(paste.format, paste.data)
    except ParseException, pe:
        log.exception(pe)
Exemplo n.º 2
0
def get_paste(key, format):
    paste = Paste.by_key(key)
    if paste is None:
        raise NotFound('No such table: %s' % key)
    etag = generate_etag(key, format)
    if request.if_none_match and request.if_none_match == etag:
        raise NotModified()
    has_header, table = False, None
    try:
        has_header, table = parse(paste.format, paste.data)
    except ParseException, pe:
        log.exception(pe)