def handle_b(abe, page):
if page.get('chain') is not None:
chain = page['chain']
height = wsgiref.util.shift_path_info(page['env'])
try:
height = int(height)
except Exception:
raise PageNotFound()
if height < 0 or page['env']['PATH_INFO'] != '':
raise PageNotFound()
cmd = wsgiref.util.shift_path_info(page['env'])
if cmd is not None:
raise PageNotFound() # XXX want to support /a/...
page['title'] = [escape(chain.name), ' ', height]
abe._show_block(page, page['dotdot'] + 'block/', chain, block_number=height)
return
abe.show_search_results(
page,
abe.search_hash_prefix(
shortlink_block(wsgiref.util.shift_path_info(page['env'])),
('block',)))
评论列表
文章目录