MCPcopy Create free account
hub / github.com/aws/aws-cli / get_config_variable

Method get_config_variable

tests/unit/customizations/test_globalargs.py:40–52  ·  view source on GitHub ↗
(
        self, name, methods=('env', 'config'), default=None
    )

Source from the content-addressed store, hash-verified

38 self.config_file_vars = config_file_vars
39
40 def get_config_variable(
41 self, name, methods=('env', 'config'), default=None
42 ):
43 value = None
44 config_name, envvar_name = self.session_var_map[name]
45 if methods is not None:
46 if 'env' in methods and value is None:
47 value = os.environ.get(envvar_name)
48 if 'config' in methods and value is None:
49 value = self.config_file_vars.get(config_name)
50 else:
51 value = default
52 return value
53
54
55class TestGlobalArgsCustomization(unittest.TestCase):

Calls

no outgoing calls

Tested by

no test coverage detected