File: HTTPExceptions.py

package info (click to toggle)
pastewebkit 1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 536 kB
  • ctags: 662
  • sloc: python: 3,346; makefile: 40
file content (8 lines) | stat: -rw-r--r-- 305 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
from paste.httpexceptions import *

class HTTPAuthenticationRequired(HTTPUnauthorized):

    def __init__(self, realm=None, message=None, headers=None):
        headers = headers or {}
        headers['WWW-Authenticate'] = 'Basic realm=%s' % realm
        HTTPUnathorized.__init__(self, message, headers)