From dd0c53158f1be446c9be3c9d5996af1a22dec69b Mon Sep 17 00:00:00 2001 From: Beto Dealmeida Date: Wed, 16 Dec 2020 21:34:23 -0800 Subject: [PATCH] fix: handle context-dependent feature flags in CLI (#12088) --- superset/cli.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/superset/cli.py b/superset/cli.py index a93dbed0c9..02421e9ece 100755 --- a/superset/cli.py +++ b/superset/cli.py @@ -46,7 +46,12 @@ feature_flags.update(config.FEATURE_FLAGS) feature_flags_func = config.GET_FEATURE_FLAGS_FUNC if feature_flags_func: # pylint: disable=not-callable - feature_flags = feature_flags_func(feature_flags) + try: + feature_flags = feature_flags_func(feature_flags) + except Exception: # pylint: disable=broad-except + # bypass any feature flags that depend on context + # that's not available + pass def normalize_token(token_name: str) -> str: