Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Changed django/db/ load_backend() to call sorted() instead of…

… .sort(). Saves us a line of code. Taken from patch for #15621

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ad55bb0f875d00c1bae8e6b144aaba0cc223395e 1 parent 304a50d
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  django/db/
3  django/db/
@@ -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)
raise # If there's some other error, this must be an error in Django itself.
Please sign in to comment.
Something went wrong with that request. Please try again.