~ubuntu-branches/ubuntu/quantal/language-selector/quantal

« back to all changes in this revision

Viewing changes to LanguageSelector/LocaleInfo.py

  • Committer: Steve Langasek
  • Date: 2012-08-11 04:57:02 UTC
  • Revision ID: steve.langasek@canonical.com-20120811045702-dp3n5mbb9pu5io2y
Do not touch /etc/environment; we should be updating /etc/default/locale
exclusively.  On upgrade, clean up any references that have been left
behind in /etc/environment. LP: #1035498.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
class LocaleInfo(object):
23
23
    " class with handy functions to parse the locale information "
24
24
    
25
 
    environments = ["/etc/default/locale", "/etc/environment"]
 
25
    environments = ["/etc/default/locale"]
26
26
    def __init__(self, languagelist_file, datadir):
27
27
        self._datadir = datadir
28
28
        LANGUAGELIST = os.path.join(datadir, 'data', languagelist_file)
300
300
                        match_language = re.match(r'LANGUAGE=(.*)$',line)
301
301
                        if match_language:
302
302
                            language = match_language.group(1)
303
 
                if len(lang) > 0:
304
 
                    break
305
303
        if len(lang) == 0:
306
304
            # fall back is 'en_US'
307
305
            lang = 'en_US.UTF-8'