From 7bfc9fac9d275911cc1e8a2ea30891d38bc1b54e Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Sat, 19 Mar 2011 19:48:23 +0000 Subject: [PATCH] rename babel.localedata.list() to ease Python 3 transition (fixes #250) --- babel/localedata.py | 4 ++-- babel/messages/frontend.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/babel/localedata.py b/babel/localedata.py index 99cfd030..78b23578 100644 --- a/babel/localedata.py +++ b/babel/localedata.py @@ -25,7 +25,7 @@ except ImportError: 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 @@ def exists(name): 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 index 6699bb80..a9648955 100755 --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -626,7 +626,7 @@ class CommandLineInterface(object): 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) -- 2.47.3