kona.options¶
-
exception
kona.options.
BadKonaOption
(optns, *keys)[source]¶ Bases:
exceptions.Exception
Special exception class for identifying bad Kona configuration options.
Parameters: - optns (dict) – Options dictionary containing the bad configuration.
- *keys (string) – Hierarchy of dictionary keys identifying the bad configuration.
-
kona.options.
get_opt
(optns, default, *keys)[source]¶ Utility function to make it easier to work with nested options dictionaries.
Parameters: - optns (dict) – Nested dictionary.
- default (Unknown) – Value to return of the dictionary is empty.
- *keys (string) – Keys from which value will be pulled
Returns: Dictionary value corresponding to given hierarchy of keys.
Return type: Unknown