Skip to main content

ConfigError

The config file is corrupt, or there is none and nothing says what to write.

Usage

Source

ConfigError()

Raised by load_config and ensure_config when the config file does not parse, or when there is no file and no seed_root to write one from. A file that does not parse never reads as “not configured”.

This is a subclass of RuntimeError, not of ValueError. remove_root raises ValueError for a bad argument, and an except ValueError around it must not swallow a broken config file.

The CLI prints the message and exits with code 78, the conventional code for a configuration error (EX_CONFIG). It is outside the 0 to 7 that check uses as verdict bits. spice-kernel-db config --setup writes a fresh file.