def __init__(self, config=None):
"""Instantiate configuration."""
self.raw_config = {}
self.config_path = config
# These get assigned in style_configuration decorator.
self._style_task = None
self._style_flow = None
self._style_condition = None
self._style_condition_foreach = None
self._style_storage = None
self._style_edge = None
self._style_store_edge = None
self._style_graph = None
self._style_fallback_edge = None
self._style_fallback_node = None
self._style_fallback_true = None
if self.config_path is not None:
try:
with open(self.config_path) as input_file:
self.raw_config = yaml.load(input_file, Loader=yaml.SafeLoader)
except Exception as exc:
raise RequestError("Unable to load or parse style configuration file %r: %s"
% (self.config_path, str(exc))) from exc
评论列表
文章目录