diff options
author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-26 13:55:28 +0000 |
---|---|---|
committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-26 13:55:28 +0000 |
commit | b89d409bf7ed7f9d6248c1ec188e241bdf5d4aa2 (patch) | |
tree | 788960142c3405aae76c00a145f446881e48ede4 | |
parent | dbb785c0b4da1103368cc2d1e368d91063117ec6 (diff) | |
download | django-b89d409bf7ed7f9d6248c1ec188e241bdf5d4aa2.tar.gz |
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
-rw-r--r-- | django/utils/tzinfo.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/tzinfo.py b/django/utils/tzinfo.py index 0c85735941..e2e1d10fc1 100644 --- a/django/utils/tzinfo.py +++ b/django/utils/tzinfo.py @@ -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." |