try:

        settings = get_current_registry().settings

        if is_cli_request():