More removal of poorly legible constructs to workaround Python 2.4 shortcomings.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ramiro Morales 2011-06-10 18:43:29 +00:00
parent 0e03a504bf
commit c43d15b3b3
5 changed files with 12 additions and 17 deletions

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import datetime
import time
from django.conf import settings
from django.forms import *
from django.forms.extras import SelectDateWidget
@ -379,7 +379,7 @@ class FormsExtraTestCase(unittest.TestCase, AssertFormErrorsMixin):
def decompress(self, value):
if value:
data = value.split(',')
return [data[0], data[1], datetime.datetime(*time.strptime(data[2], "%Y-%m-%d %H:%M:%S")[0:6])]
return [data[0], data[1], datetime.datetime.strptime(data[2], "%Y-%m-%d %H:%M:%S")]
return [None, None, None]
def format_output(self, rendered_widgets):