1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

Worked around the situation when getdefaultlocale() might return (None, None),

which apparently can happen.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-06-26 13:55:28 +00:00
parent dbb785c0b4
commit b89d409bf7

View File

@ -5,7 +5,7 @@ import time
from datetime import timedelta, tzinfo
from django.utils.encoding import smart_unicode
DEFAULT_ENCODING = locale.getdefaultlocale()[1]
DEFAULT_ENCODING = locale.getdefaultlocale()[1] or 'ascii'
class FixedOffset(tzinfo):
"Fixed offset in minutes east from UTC."