summaryrefslogtreecommitdiff
path: root/django/utils/http.py
diff options
context:
space:
mode:
authorkonarkmodi <modi.konark@gmail.com>2013-03-19 10:34:59 +0530
committerCarl Meyer <carl@oddbird.net>2013-03-19 15:42:39 -0700
commitbc4111ba68e5eede1f68882a16d68441a845e30b (patch)
tree0b7689470b8ff28cdaee5fbe5053b81c720fd497 /django/utils/http.py
parent1fe90b281baa1601e4582fd9454b92740e527d89 (diff)
Fixed #18003 -- Preserved tracebacks when re-raising errors.
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
Diffstat (limited to 'django/utils/http.py')
-rw-r--r--django/utils/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/http.py b/django/utils/http.py
index 0ab5198804..73b6396286 100644
--- a/django/utils/http.py
+++ b/django/utils/http.py
@@ -144,7 +144,7 @@ def parse_http_date(date):
result = datetime.datetime(year, month, day, hour, min, sec)
return calendar.timegm(result.utctimetuple())
except Exception:
- raise ValueError("%r is not a valid date" % date)
+ six.reraise(ValueError, ValueError("%r is not a valid date" % date), sys.exc_info()[2])
def parse_http_date_safe(date):
"""