Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #8239 -- Google App Engine has a restricted "imp" module, which…

… doesn't

include one of the methods we use when constructing management help commands.
So postpone the resolving of the method name until when we actually need it
(which isn't run as part of GAE). Patch from Guido van Rossum.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8425 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c92b424e5766c0d5b883b59ea3329d84e54b3c9a 1 parent 98be841
Malcolm Tredinnick authored August 17, 2008

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  django/core/management/__init__.py
6  django/core/management/__init__.py
... ...
@@ -1,7 +1,7 @@
1 1
 import os
2 2
 import sys
3 3
 from optparse import OptionParser
4  
-from imp import find_module
  4
+import imp
5 5
 
6 6
 import django
7 7
 from django.core.management.base import BaseCommand, CommandError, handle_default_options
@@ -47,14 +47,14 @@ def find_management_module(app_name):
47 47
     # module, we need look for the case where the project name is part
48 48
     # of the app_name but the project directory itself isn't on the path.
49 49
     try:
50  
-        f, path, descr = find_module(part,path) 
  50
+        f, path, descr = imp.find_module(part,path)
51 51
     except ImportError,e:
52 52
         if os.path.basename(os.getcwd()) != part:
53 53
             raise e
54 54
         
55 55
     while parts:
56 56
         part = parts.pop()
57  
-        f, path, descr = find_module(part, path and [path] or None)
  57
+        f, path, descr = imp.find_module(part, path and [path] or None)
58 58
     return path
59 59
 
60 60
 def load_command_class(app_name, name):

0 notes on commit c92b424

Please sign in to comment.
Something went wrong with that request. Please try again.