mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed a corner case in management.setup_environ (it was triggered under Cygwin, but also perhaps could happen elsewhere). Thanks, Doug Napoleone.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -243,7 +243,7 @@ def setup_environ(settings_mod):
|
||||
# way. For example, if this file (manage.py) lives in a directory
|
||||
# "myproject", this code would add "/path/to/myproject" to sys.path.
|
||||
project_directory, settings_filename = os.path.split(settings_mod.__file__)
|
||||
if not project_directory:
|
||||
if project_directory == os.curdir or not project_directory:
|
||||
project_directory = os.getcwd()
|
||||
project_name = os.path.basename(project_directory)
|
||||
settings_name = os.path.splitext(settings_filename)[0]
|
||||
|
||||
Reference in New Issue
Block a user