Author: kkubasik
Date: 2009-07-01 05:39:06 -0500 (Wed, 01 Jul 2009)
New Revision: 11136

Modified:
   django/branches/soc2009/test-improvements/
   
django/branches/soc2009/test-improvements/django/core/management/commands/test_windmill.py
Log:
[gsoc2009-testing] Use importlib from django.util in attempt_import



Property changes on: django/branches/soc2009/test-improvements
___________________________________________________________________
Name: svk:merge
   - 23ef3597-c209-482b-90c0-ea6045f15f7f:/local/django-gsoc:10936
23ef3597-c209-482b-90c0-ea6045f15f7f:/local/django/trunk:10927
bcc190cf-cafb-0310-a4f2-bffc1f526a37:/django/trunk:1054
   + 23ef3597-c209-482b-90c0-ea6045f15f7f:/local/django-gsoc:10951
23ef3597-c209-482b-90c0-ea6045f15f7f:/local/django/trunk:10927
bcc190cf-cafb-0310-a4f2-bffc1f526a37:/django/trunk:1054

Modified: 
django/branches/soc2009/test-improvements/django/core/management/commands/test_windmill.py
===================================================================
--- 
django/branches/soc2009/test-improvements/django/core/management/commands/test_windmill.py
  2009-07-01 05:01:59 UTC (rev 11135)
+++ 
django/branches/soc2009/test-improvements/django/core/management/commands/test_windmill.py
  2009-07-01 10:39:06 UTC (rev 11136)
@@ -6,19 +6,19 @@
 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)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to