mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-08 05:31:29 +08:00
test if settings.py exists
This commit is contained in:
parent
84d4510847
commit
54f0e74111
@ -34,6 +34,10 @@ from gunicorn.main import main
|
|||||||
__usage__ = "%prog [OPTIONS]"
|
__usage__ = "%prog [OPTIONS]"
|
||||||
|
|
||||||
PROJECT_PATH = os.getcwd()
|
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]
|
PROJECT_NAME = os.path.split(PROJECT_PATH)[-1]
|
||||||
|
|
||||||
sys.path.insert(0, PROJECT_PATH)
|
sys.path.insert(0, PROJECT_PATH)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user