Exemplo n.º 1
0
def load_config_file(config_file=None):
    from localstack.utils.common import get_or_create_file, to_str
    config_file = config_file or CONFIG_FILE_PATH
    content = get_or_create_file(config_file)
    try:
        configs = json.loads(to_str(content) or '{}')
    except Exception as e:
        print('Unable to load local config file %s as JSON: %s' % (config_file, e))
        return {}
    return configs
Exemplo n.º 2
0
def _get_config_file(path):
    get_or_create_file(path, permissions=0o600)
    return path
Exemplo n.º 3
0
def _get_config_file(path):
    common.get_or_create_file(path)
    return path
Exemplo n.º 4
0
def _get_config_file(path):
    get_or_create_file(path)
    return path