summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-17 17:35:33 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-17 17:35:33 +0000
commitc92b424e5766c0d5b883b59ea3329d84e54b3c9a (patch)
tree7006af7106d95e8adb8ac29391984fc5b7e7bf4b
parent98be84154942789e498d8717c8d25f378ca456b1 (diff)
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
-rw-r--r--django/core/management/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py
index 6f883ee7bb..fc1e82b8fc 100644
--- a/django/core/management/__init__.py
+++ b/django/core/management/__init__.py
@@ -1,7 +1,7 @@
import os
import sys
from optparse import OptionParser
-from imp import find_module
+import imp
import django
from django.core.management.base import BaseCommand, CommandError, handle_default_options
@@ -47,14 +47,14 @@ def find_management_module(app_name):
# module, we need look for the case where the project name is part
# of the app_name but the project directory itself isn't on the path.
try:
- f, path, descr = find_module(part,path)
+ f, path, descr = imp.find_module(part,path)
except ImportError,e:
if os.path.basename(os.getcwd()) != part:
raise e
while parts:
part = parts.pop()
- f, path, descr = find_module(part, path and [path] or None)
+ f, path, descr = imp.find_module(part, path and [path] or None)
return path
def load_command_class(app_name, name):