mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix module detection. fix #322
Gunicorn has now the possibility to directly pass the settings env as argument but it was breaking the old way to do it when giving a path to the settings file instead.
This commit is contained in:
parent
bb9ddb4ca9
commit
d06380d1f0
@ -71,7 +71,8 @@ class DjangoApplication(Application):
|
||||
|
||||
def init(self, parser, opts, args):
|
||||
if args:
|
||||
if "." in args[0]:
|
||||
if ("." in args[0] and not (os.path.isfile(args[0])
|
||||
or os.path.isdir(args[0]))):
|
||||
self.cfg.set("django_settings", args[0])
|
||||
else:
|
||||
# not settings env set, try to build one.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user