def __getitem__(self, name):
try:
resource = self.get(name)
except KeyError:
# Just in case we get an unexpected KeyError
# FIXME: exception logging.
raise HTTPInternalServerError('Traversal raised KeyError')
if resource is None:
raise KeyError(name)
return resource
评论列表
文章目录