summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2011-03-03 18:42:59 +0000
committerRamiro Morales <cramm0@gmail.com>2011-03-03 18:42:59 +0000
commitd50f59ee18f6f1241f4d14d7218b6fb64ce9c3b5 (patch)
tree27ce1b06f7a6568c10d45fc5a8bfd289001018c2
parente8fa1abd78367d92750db4d311fed15c2727e380 (diff)
Fixed #15543 -- Tweaked change from r15696 to not use 'if' syntax introduce in Python 2.5. Thanks to an anonymous reporter for the heads up.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/utils/http.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/utils/http.py b/django/utils/http.py
index bdc367c8f7..ae2dabf736 100644
--- a/django/utils/http.py
+++ b/django/utils/http.py
@@ -105,7 +105,10 @@ def parse_http_date(date):
try:
year = int(m.group('year'))
if year < 100:
- year += 2000 if year < 70 else 1900
+ if year < 70:
+ year += 2000
+ else:
+ year += 1900
month = MONTHS.index(m.group('mon').lower()) + 1
day = int(m.group('day'))
hour = int(m.group('hour'))