Load system configuration from YAML file.
(self)
| 19 | self.error_messages = self.config["error_messages"] |
| 20 | |
| 21 | def _load_config(self): |
| 22 | """Load system configuration from YAML file.""" |
| 23 | config_path = importlib.resources.files("config").joinpath("system_config.yaml") |
| 24 | try: |
| 25 | with config_path.open("r") as f: |
| 26 | yaml_data = yaml.safe_load(f) |
| 27 | return yaml_data |
| 28 | except Exception as e: |
| 29 | console.error(f"Failed to load system configuration: {e}") |
| 30 | sys.exit(69) |
| 31 | |
| 32 | |
| 33 | # Create a singleton instance |