fix: handle context-dependent feature flags in CLI (#12088)

This commit is contained in:
Beto Dealmeida 2020-12-16 21:34:23 -08:00 committed by GitHub
parent 655834b25c
commit dd0c53158f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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: