mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
Fixed #2968 -- Changed arguments to __import__ to use empty dictionary instead of empty string, for stricter compliance with Python library reference. Thanks for the patch, Yasushi Masuda
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -446,7 +446,7 @@ def syncdb(verbosity=1, interactive=True):
|
||||
# dispatcher events.
|
||||
for app_name in settings.INSTALLED_APPS:
|
||||
try:
|
||||
__import__(app_name + '.management', '', '', [''])
|
||||
__import__(app_name + '.management', {}, {}, [''])
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -1230,7 +1230,7 @@ def test(app_labels, verbosity=1):
|
||||
test_module_name = '.'.join(test_path[:-1])
|
||||
else:
|
||||
test_module_name = '.'
|
||||
test_module = __import__(test_module_name, [],[],test_path[-1])
|
||||
test_module = __import__(test_module_name, {}, {}, test_path[-1])
|
||||
test_runner = getattr(test_module, test_path[-1])
|
||||
|
||||
test_runner(app_list, verbosity)
|
||||
@@ -1419,7 +1419,7 @@ def setup_environ(settings_mod):
|
||||
project_directory = os.path.dirname(settings_mod.__file__)
|
||||
project_name = os.path.basename(project_directory)
|
||||
sys.path.append(os.path.join(project_directory, '..'))
|
||||
project_module = __import__(project_name, '', '', [''])
|
||||
project_module = __import__(project_name, {}, {}, [''])
|
||||
sys.path.pop()
|
||||
|
||||
# Set DJANGO_SETTINGS_MODULE appropriately.
|
||||
|
||||
Reference in New Issue
Block a user