MCPcopy Index your code
hub / github.com/docker/docker-py / load_general_config

Function load_general_config

docker/utils/config.py:51–66  ·  view source on GitHub ↗
(config_path=None)

Source from the content-addressed store, hash-verified

49
50
51def load_general_config(config_path=None):
52 config_file = find_config_file(config_path)
53
54 if not config_file:
55 return {}
56
57 try:
58 with open(config_file) as f:
59 return json.load(f)
60 except (OSError, ValueError) as e:
61 # In the case of a legacy `.dockercfg` file, we won't
62 # be able to load any JSON data.
63 log.debug(e)
64
65 log.debug("All parsing attempts failed - returning empty config")
66 return {}

Callers

nothing calls this directly

Calls 2

find_config_fileFunction · 0.85
loadMethod · 0.80

Tested by

no test coverage detected