fix: catch standalone command exception
gevent will not be installed by default, therefore print a message explaining required steps
This commit is contained in:
parent
b3273ee9e2
commit
678935bd0e
1 changed files with 8 additions and 1 deletions
|
|
@ -30,7 +30,14 @@ def command_standalone(**kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from httpaste import load_config, get_flask_app
|
from httpaste import load_config, get_flask_app
|
||||||
from gevent.pywsgi import WSGIServer
|
|
||||||
|
try:
|
||||||
|
from gevent.pywsgi import WSGIServer
|
||||||
|
except ImportError as e:
|
||||||
|
raise ImportError(' '.join((
|
||||||
|
'gevent is currently not installed.',
|
||||||
|
'Please install it by running \'python3 -m pip install gevent\'.'
|
||||||
|
))) from e
|
||||||
|
|
||||||
config, server_config = load_config(kwargs.get('config_path'))
|
config, server_config = load_config(kwargs.get('config_path'))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue