<s> from flask import current_app <EOL> from flask . ext . featureflags import FEATURE_FLAGS_CONFIG <EOL> from flask . ext . featureflags import NoFeatureFlagFound <EOL> from flask . ext . featureflags import log <EOL> class InlineFeatureFlag ( object ) : <EOL> def __call__ ( self , feature ) : <EOL> if not current_app : <EOL> log . warn ( u"<STR_LIT>" . format ( feature = feature ) ) <EOL> return False <EOL> feature_cfg = "<STR_LIT>" . format ( prefix = FEATURE_FLAGS_CONFIG , feature = feature ) <EOL> try : <EOL> return current_app . config [ feature_cfg ] <EOL> except KeyError : <EOL> raise NoFeatureFlagFound ( ) </s>
