Django

Code

Changeset 8425

Show
Ignore:
Timestamp:
08/17/08 12:35:33 (4 months ago)
Author:
mtredinnick
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/management/__init__.py

    r8323 r8425  
    22import sys 
    33from optparse import OptionParser 
    4 from imp import find_module 
     4import imp 
    55 
    66import django 
     
    4848    # of the app_name but the project directory itself isn't on the path. 
    4949    try: 
    50         f, path, descr = find_module(part,path)  
     50        f, path, descr = imp.find_module(part,path) 
    5151    except ImportError,e: 
    5252        if os.path.basename(os.getcwd()) != part: 
     
    5555    while parts: 
    5656        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) 
    5858    return path 
    5959