From 0f3f2e6ab74f9604052f24022302baef72b4eb87 Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Thu, 7 Oct 2010 10:15:36 -0400 Subject: [PATCH] Fixes loading config files with Django apps. Thanks to Adrien Lemaire for noticing the issue. Fixes #98 --- THANKS | 1 + gunicorn/app/djangoapp.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/THANKS b/THANKS index c808b517..3c7aa8af 100644 --- a/THANKS +++ b/THANKS @@ -16,3 +16,4 @@ thomasst Jonas Borgström PA Parent Travis Cline +Adrien Lemaire diff --git a/gunicorn/app/djangoapp.py b/gunicorn/app/djangoapp.py index f32b3d99..cbc73384 100644 --- a/gunicorn/app/djangoapp.py +++ b/gunicorn/app/djangoapp.py @@ -68,9 +68,9 @@ class DjangoApplicationCommand(Application): "__package__": None } try: - execfile(config_file, cfg, cfg) + execfile(self.config_file, cfg, cfg) except Exception, e: - print "Failed to read config file: %s" % config_file + print "Failed to read config file: %s" % self.config_file traceback.print_exc() sys.exit(1)