summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Kubasik <kevin@kubasik.net>2009-07-01 10:39:06 +0000
committerKevin Kubasik <kevin@kubasik.net>2009-07-01 10:39:06 +0000
commit833b2334bcddf019b125689a85c0d4f3bd6515fa (patch)
tree890952c25f107a17467936afbf555604b5a08f38
parent8639d7e2d375fa17a32e19f5c19664d5e6313d5c (diff)
[gsoc2009-testing] Use importlib from django.util in attempt_import
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/test-improvements@11136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/management/commands/test_windmill.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/core/management/commands/test_windmill.py b/django/core/management/commands/test_windmill.py
index 27352e3438..7031431fd7 100644
--- a/django/core/management/commands/test_windmill.py
+++ b/django/core/management/commands/test_windmill.py
@@ -6,19 +6,19 @@ from time import sleep
import types
import logging
import threading
-
+from django.utils import importlib
class ServerContainer(object):
start_test_server = djangotest.start_test_server
stop_test_server = djangotest.stop_test_server
def attempt_import(name, suffix):
try:
- mod = __import__(name+'.'+suffix)
+ mod = importlib.import_module(name+'.'+suffix)
except ImportError:
mod = None
if mod is not None:
s = name.split('.')
- mod = __import__(s.pop(0))
+ mod = importlib.import_module(s.pop(0))
for x in s+[suffix]:
try:
mod = getattr(mod, x)