adding a work around for new gunicorn (#523)

This commit is contained in:
kevgliss 2016-11-22 16:47:29 -08:00 committed by GitHub
parent 9d03e75d9b
commit d5d036b412
1 changed files with 10 additions and 4 deletions

View File

@ -364,10 +364,16 @@ class LemurServer(Command):
def get_options(self): def get_options(self):
settings = make_settings() settings = make_settings()
options = ( options = []
Option(*klass.cli, action=klass.action) for setting, klass in settings.items():
for setting, klass in settings.items() if klass.cli if klass.cli:
) if klass.action:
if klass.action == 'store_const':
options.append(Option(*klass.cli, const=klass.const, action=klass.action))
else:
options.append(Option(*klass.cli, action=klass.action))
else:
options.append(Option(*klass.cli))
return options return options