Ticket #8239: mgt.diff

File mgt.diff, 1.0 KB (added by Guido van Rossum <guido@…>, 16 years ago)

patch

  • core/management/__init__.py

     
    11import os
    22import sys
    33from optparse import OptionParser
    4 from imp import find_module
     4import imp
    55
    66import django
    77from django.core.management.base import BaseCommand, CommandError, handle_default_options
     
    4747    # module, we need look for the case where the project name is part
    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:
    5353            raise e
    5454       
    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
    6060def load_command_class(app_name, name):
Back to Top