From 87efcc0e99c235f860c9dd5d6a5c73ba54b0c959 Mon Sep 17 00:00:00 2001 From: bmccandless Date: Mon, 2 Mar 2020 11:55:57 -0800 Subject: [PATCH] Fix a few bugs from server refactor (#1188) - Fixes #1185 port command line argument was not handle correctly - Fixes #1184 was not catching the "DatasetAccessError" exception. --- server/cli/launch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/cli/launch.py b/server/cli/launch.py index ab46a667..c8484451 100644 --- a/server/cli/launch.py +++ b/server/cli/launch.py @@ -12,6 +12,7 @@ import click from server.common.utils import custom_format_warning from server.common.utils import find_available_port, is_port_available, sort_options +from server.common.errors import DatasetAccessError from server.data_common.matrix_loader import MatrixDataLoader, MatrixDataCacheManager from server.common.annotations import AnnotationsLocalFile from server.common.app_config import AppConfig @@ -167,7 +168,7 @@ def server_args(func): "--port", "-p", metavar="", - default=DEFAULT_SERVER_PORT, + default=None, show_default=True, help="Port to run server on. If not specified cellxgene will find an available port.", ) @@ -313,7 +314,7 @@ def launch( try: matrix_data_loader.pre_load_validation() - except RuntimeError as e: + except DatasetAccessError as e: raise click.ClickException(str(e)) file_size = matrix_data_loader.file_size()