mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix issue #221 don't override sys.path if project_path is already in.
This commit is contained in:
parent
0f53a83f49
commit
1a796ebbc6
@ -44,6 +44,7 @@ class DjangoApplication(Application):
|
|||||||
self.cfg.set("default_proc_name", self.settings_modname)
|
self.cfg.set("default_proc_name", self.settings_modname)
|
||||||
|
|
||||||
# add the project path to sys.path
|
# add the project path to sys.path
|
||||||
|
if not self.project_path in sys.path:
|
||||||
sys.path.insert(0, self.project_path)
|
sys.path.insert(0, self.project_path)
|
||||||
sys.path.append(os.path.normpath(os.path.join(self.project_path,
|
sys.path.append(os.path.normpath(os.path.join(self.project_path,
|
||||||
os.pardir)))
|
os.pardir)))
|
||||||
@ -132,6 +133,7 @@ class DjangoApplicationCommand(DjangoApplication):
|
|||||||
|
|
||||||
|
|
||||||
# add the project path to sys.path
|
# add the project path to sys.path
|
||||||
|
if not self.project_path in sys.path:
|
||||||
sys.path.insert(0, self.project_path)
|
sys.path.insert(0, self.project_path)
|
||||||
sys.path.append(os.path.normpath(os.path.join(self.project_path,
|
sys.path.append(os.path.normpath(os.path.join(self.project_path,
|
||||||
os.pardir)))
|
os.pardir)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user