sort backends by name when querying user to select one

This commit is contained in:
Romain Bignon 2011-07-22 21:02:21 +02:00
commit ddda7f88e4

View file

@ -40,7 +40,7 @@ __all__ = ['ConsoleApplication', 'BackendNotGiven']
class BackendNotGiven(Exception):
def __init__(self, id, backends):
self.id = id
self.backends = backends
self.backends = sorted(backends)
Exception.__init__(self, 'Please specify a backend to use for this argument (%s@backend_name). '
'Availables: %s.' % (id, ', '.join(name for name, backend in backends)))