autocat3/errors.py

15 lines
420 B
Python
Raw Normal View History

2019-08-01 20:20:18 +00:00
#!/usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*- coding: utf-8 -*-
2019-08-01 23:40:23 +00:00
import cherrypy
2019-08-01 20:20:18 +00:00
from BaseSearcher import OpenSearch
from Page import Page
import Formatters
class ErrorPage(Page):
def __init__(self, status=500, message='undefined error'):
self.message = message
self.status = status
def index(self):
return Formatters.formatters['html'].render('error', self)