# HG changeset patch # User fschwarz # Date 1300564103 0 # Node ID b33c36615fe9a8da67c2d1b2cc6654e279aedfc4 # Parent afdab04b85274e6cf01c7e17759056e554999d25 rename babel.localedata.list() to ease Python 3 transition (fixes #250) diff --git a/babel/localedata.py b/babel/localedata.py --- a/babel/localedata.py +++ b/babel/localedata.py @@ -25,7 +25,7 @@ import dummy_threading as threading from UserDict import DictMixin -__all__ = ['exists', 'list', 'load'] +__all__ = ['exists', 'locale_identifiers', 'load'] __docformat__ = 'restructuredtext en' _cache = {} @@ -45,7 +45,7 @@ return os.path.exists(os.path.join(_dirname, '%s.dat' % name)) -def list(): +def locale_identifiers(): """Return a list of all locale identifiers for which locale data is available. diff --git a/babel/messages/frontend.py b/babel/messages/frontend.py --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -626,7 +626,7 @@ self._configure_logging(options.loglevel) if options.list_locales: - identifiers = localedata.list() + identifiers = localedata.locale_identifiers() longest = max([len(identifier) for identifier in identifiers]) identifiers.sort() format = u'%%-%ds %%s' % (longest + 1)