Django

Code

Changeset 7184

Show
Ignore:
Timestamp:
02/29/08 11:13:20 (10 months ago)
Author:
mtredinnick
Message:

Fixed #5846 -- Bullet-proofed the default timezone encoding test.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/utils/tzinfo.py

    r6749 r7184  
    66from django.utils.encoding import smart_unicode 
    77 
    8 DEFAULT_ENCODING = locale.getdefaultlocale()[1] or 'ascii' 
     8try: 
     9    DEFAULT_ENCODING = locale.getdefaultlocale()[1] or 'ascii' 
     10except: 
     11    # Any problems at all determining the locale and we fallback. See #5846. 
     12    DEFAULT_ENCODING = 'ascii' 
    913 
    1014class FixedOffset(tzinfo):