Updated a few localization formats to stop the changes done in r17473 from breaking the tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2012-02-10 01:13:29 +00:00
parent 8ae02fde2b
commit c1acda6d8f
21 changed files with 43 additions and 44 deletions

View file

@ -147,7 +147,7 @@ class DateFormat(TimeFormat):
def e(self):
"Timezone name if available"
try:
if self.data.tzinfo:
if hasattr(self.data, 'tzinfo') and self.data.tzinfo:
# Have to use tzinfo.tzname and not datetime.tzname
# because datatime.tzname does not expect Unicode
return self.data.tzinfo.tzname(self.data) or ""