commit
55ec3a41e8
1 changed files with 9 additions and 2 deletions
|
|
@ -30,7 +30,14 @@ def command_standalone(**kwargs):
|
|||
"""
|
||||
|
||||
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'))
|
||||
|
||||
|
|
@ -110,7 +117,7 @@ def parser():
|
|||
|
||||
p = argparse.ArgumentParser(description='Process some integers.')
|
||||
|
||||
sp = p.add_subparsers(dest='command')
|
||||
sp = p.add_subparsers(dest='command', required=True)
|
||||
|
||||
p_standalone = sp.add_parser('standalone', help=command_standalone.__doc__)
|
||||
p_standalone.add_argument('--config-path', '-c', required=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue