diff options
| author | Tom <tom@tomforb.es> | 2017-07-21 21:33:26 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-04-19 21:30:00 -0400 |
| commit | 11b8c30b9e02ef6ecb996ad3280979dfeab700fa (patch) | |
| tree | a086c9dc9bfe15f58da7db1393f122e690d5a670 /django/db/utils.py | |
| parent | 5d923f2d8cadb06497d255097caa4583d66b697a (diff) | |
Ref #23919 -- Replaced some os.path usage with pathlib.Path.
Diffstat (limited to 'django/db/utils.py')
| -rw-r--r-- | django/db/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/utils.py b/django/db/utils.py index d5174682e1..6202a9a4aa 100644 --- a/django/db/utils.py +++ b/django/db/utils.py @@ -1,6 +1,6 @@ -import os import pkgutil from importlib import import_module +from pathlib import Path from threading import local from django.conf import settings @@ -111,7 +111,7 @@ def load_backend(backend_name): except ImportError as e_user: # The database backend wasn't found. Display a helpful error message # listing all built-in database backends. - backend_dir = os.path.join(os.path.dirname(__file__), 'backends') + backend_dir = str(Path(__file__).parent / 'backends') builtin_backends = [ name for _, name, ispkg in pkgutil.iter_modules([backend_dir]) if ispkg and name not in {'base', 'dummy', 'postgresql_psycopg2'} |
