Beispiel #1
0
 def __init__(self):
     status = '500 Internal Server Error'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle500())
Beispiel #2
0
 def __init__(self, message=None):
     status = "400 Bad Request"
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, message or self.message)
Beispiel #3
0
 def __init__(self):
     status = '404 Not Found'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle404())
Beispiel #4
0
 def nomethod(cls):
     return HTTPError(*build_error(
         '405 Method Not Allowed',
         'This HTTP Method is not supported on %s' % (cls.__name__)))
Beispiel #5
0
 def internalerror():
     return HTTPError(*build_error('500 Internal Server Error',
                                   'An unexpected error occured'))
Beispiel #6
0
 def notfound():
     return HTTPError(
         *build_error('404 Not Found', 'This page is not found'))
Beispiel #7
0
 def __init__(self):
     status = '500 Internal Server Error'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle500())
Beispiel #8
0
 def __init__(self):
     status = '404 Not Found'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle404())