From 32933d27b23f4cf0a142f797e2fda8af2434a1e4 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 19 Mar 2008 04:04:19 +0000 Subject: [PATCH] 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 --- AUTHORS | 1 + django/core/management/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 7a839faf88..f535ddda0f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -257,6 +257,7 @@ answer newbie questions, and generally made Django that much better: Robin Munn Robert Myers Nebojša Dorđević + Doug Napoleone Gopal Narayanan Fraser Nevett Sam Newman diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index d78e2eda0b..819b19a366 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -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]