From 54f0e7411158286636369c8af627c54316ece763 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Mon, 1 Feb 2010 19:11:54 +0100 Subject: [PATCH] test if settings.py exists --- bin/gunicorn_django | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/gunicorn_django b/bin/gunicorn_django index 382f221f..6acc115e 100755 --- a/bin/gunicorn_django +++ b/bin/gunicorn_django @@ -34,6 +34,10 @@ from gunicorn.main import main __usage__ = "%prog [OPTIONS]" PROJECT_PATH = os.getcwd() +if not os.path.isfile(os.path.join(PROJECT_PATH, "settings.py")): + print >>sys.stderr, "settings file not found." + sys.exit(1) + PROJECT_NAME = os.path.split(PROJECT_PATH)[-1] sys.path.insert(0, PROJECT_PATH)