(config_path=None)
| 49 | |
| 50 | |
| 51 | def 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 {} |
nothing calls this directly
no test coverage detected