user_config.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:selinon 作者: selinon 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号