diff options
| author | Richard Barrell <rchrd@brrll.co.uk> | 2011-11-08 16:41:57 -0800 |
|---|---|---|
| committer | Richard Barrell <rchrd@brrll.co.uk> | 2011-11-08 16:41:57 -0800 |
| commit | 45b15a8fb327d18078b29f9517bdd08aec366a7b (patch) | |
| tree | 625073932f5afbc8f35f9977c0eff7682d6fcff9 | |
| parent | dad2150ebea0040f5b1a5721331f479121216dc5 (diff) | |
| download | pyramid-45b15a8fb327d18078b29f9517bdd08aec366a7b.tar.gz pyramid-45b15a8fb327d18078b29f9517bdd08aec366a7b.tar.bz2 pyramid-45b15a8fb327d18078b29f9517bdd08aec366a7b.zip | |
Raise a ValueError from HTTPFound.__init__() if location is None.
| -rw-r--r-- | pyramid/httpexceptions.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pyramid/httpexceptions.py b/pyramid/httpexceptions.py index 4dbca7021..bd745df87 100644 --- a/pyramid/httpexceptions.py +++ b/pyramid/httpexceptions.py @@ -434,6 +434,8 @@ ${html_comment}''') def __init__(self, location='', detail=None, headers=None, comment=None, body_template=None, **kw): + if location is None: + raise ValueError("HTTP redirects need a location to redirect to.") super(_HTTPMove, self).__init__( detail=detail, headers=headers, comment=comment, body_template=body_template, location=location, **kw) |
