| Conditions | 3 |
| Total Lines | 10 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Load config file as a singleton.""" |
||
| 10 | def load_config(): |
||
| 11 | if hasattr(load_config, "config"): |
||
| 12 | return load_config.config |
||
| 13 | |||
| 14 | if not path.exists(config_file): |
||
| 15 | return {} |
||
| 16 | |||
| 17 | load_config.config = RawConfigParser() |
||
| 18 | load_config.config.read(config_file) |
||
| 19 | return load_config.config |
||
| 20 | |||
| 40 |