diff --git a/src/httpaste/__main__.py b/src/httpaste/__main__.py index 4a6aae4..436a46c 100644 --- a/src/httpaste/__main__.py +++ b/src/httpaste/__main__.py @@ -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)