diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-03-18 16:55:59 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-03-18 16:55:59 +0000 |
| commit | c485e236bd7e5ea40c64b2fe54d85dbb15b2fd39 (patch) | |
| tree | fc5e86abf39b69181b2084f5c39038f1811b6b44 /django/core/servers | |
| parent | ee2f04d79e5bca55637b9bb3301618738a4e342a (diff) | |
Fixed #8193: all dynamic imports in Django are now done correctly. I know this because Brett Cannon borrowed the time machine and brought Python 2.7's '`importlib` back for inclusion in Django. Thanks for the patch-from-the-future, Brett!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/servers')
| -rw-r--r-- | django/core/servers/fastcgi.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/django/core/servers/fastcgi.py b/django/core/servers/fastcgi.py index dc4c35b08d..b554095bce 100644 --- a/django/core/servers/fastcgi.py +++ b/django/core/servers/fastcgi.py @@ -12,6 +12,7 @@ Run with the extra option "help" for a list of additional options you can pass to this server. """ +from django.utils import importlib import sys, os __version__ = "0.1" @@ -113,7 +114,7 @@ def runfastcgi(argset=[], **kwargs): 'maxSpare': int(options["maxspare"]), 'minSpare': int(options["minspare"]), 'maxChildren': int(options["maxchildren"]), - 'maxRequests': int(options["maxrequests"]), + 'maxRequests': int(options["maxrequests"]), } flup_module += '_fork' elif options['method'] in ('thread', 'threaded'): @@ -128,7 +129,8 @@ def runfastcgi(argset=[], **kwargs): wsgi_opts['debug'] = False # Turn off flup tracebacks try: - WSGIServer = getattr(__import__('flup.' + flup_module, '', '', flup_module), 'WSGIServer') + module = importlib_import_module('.%s' % flup_module, 'flup') + WSGIServer = module.WSGIServer except: print "Can't import flup." + flup_module return False |
