Skip to content

Instantly share code, notes, and snippets.

@pagenoare
Created September 19, 2012 20:40
Show Gist options
  • Save pagenoare/3752129 to your computer and use it in GitHub Desktop.
Save pagenoare/3752129 to your computer and use it in GitHub Desktop.
--- eggs/djangorecipe-1.3-py2.6.egg/djangorecipe/wsgi.py 2012-09-19 14:02:46.454096503 +0200
+++ eggs/djangorecipe-1.3-py2.6.egg/djangorecipe/wsgi.py 2012-09-19 22:38:21.573173243 +0200
@@ -4,21 +4,8 @@
def main(settings_file, logfile=None):
- try:
- mod = __import__(settings_file)
- components = settings_file.split('.')
- for comp in components[1:]:
- mod = getattr(mod, comp)
-
- except ImportError:
- # XXX: Hack for python < 2.6
- _, e, _ = sys.exc_info()
- sys.stderr.write("Error loading the settings module '%s': %s"
- % (settings_file, e))
- sys.exit(1)
-
# Setup settings
- management.setup_environ(mod)
+ management.setup_environ(original_settings_path=settings_file)
if logfile:
import datetime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment