Ticket #8239: mgt.diff
File mgt.diff, 1.0 KB (added by , 16 years ago) |
---|
-
core/management/__init__.py
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 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):