From fd2f196d296ccfa489ea2213fa6bb7977708ad3e Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sat, 30 May 2020 22:54:41 +0200 Subject: [PATCH] Update utils.py --- src/pyobo/apps/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pyobo/apps/utils.py b/src/pyobo/apps/utils.py index b2f53c9d..3289f1e1 100644 --- a/src/pyobo/apps/utils.py +++ b/src/pyobo/apps/utils.py @@ -42,6 +42,11 @@ def make_gunicorn_app(app: Flask, host: str, port: int, workers: int): :rtype: gunicorn.app.base.BaseApplication """ + if not host: + raise ValueError('Must specify host') + if not port: + raise ValueError('Must specify port') + import gunicorn.app.base class StandaloneApplication(gunicorn.app.base.BaseApplication):