Author: mtredinnick
Date: 2007-06-26 08:55:28 -0500 (Tue, 26 Jun 2007)
New Revision: 5546
Modified:
django/branches/unicode/django/utils/tzinfo.py
Log:
Worked around the situation when getdefaultlocale() might return (None, None),
which apparently can happen.
Modified: django/branches/unicode/django/utils/tzinfo.py
===================================================================
--- django/branches/unicode/django/utils/tzinfo.py 2007-06-26 13:05:03 UTC
(rev 5545)
+++ django/branches/unicode/django/utils/tzinfo.py 2007-06-26 13:55:28 UTC
(rev 5546)
@@ -5,7 +5,7 @@
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."
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---