mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
Changed django/db/utils.py load_backend() to call sorted() instead of .sort(). Saves us a line of code. Taken from patch for #15621
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
304a50d8ca
commit
ad55bb0f87
@ -41,12 +41,11 @@ def load_backend(backend_name):
|
||||
and not f.startswith('.')]
|
||||
except EnvironmentError:
|
||||
available_backends = []
|
||||
available_backends.sort()
|
||||
if backend_name not in available_backends:
|
||||
error_msg = ("%r isn't an available database backend. \n" +
|
||||
"Try using django.db.backends.XXX, where XXX is one of:\n %s\n" +
|
||||
"Error was: %s") % \
|
||||
(backend_name, ", ".join(map(repr, available_backends)), e_user)
|
||||
(backend_name, ", ".join(map(repr, sorted(available_backends))), e_user)
|
||||
raise ImproperlyConfigured(error_msg)
|
||||
else:
|
||||
raise # If there's some other error, this must be an error in Django itself.
|
||||
|
Loading…
Reference in New Issue
Block a user