base.py 文件源码

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

项目:bridgy 作者: wagoodman 项目源码 文件源码
def read(self):
        # ensure yaml uses a defaultdict(str)
        yaml.add_representer(collections.defaultdict,
                             Representer.represent_str)
        try:
            with open(os.path.expanduser(self.path), 'r') as fh:
                self.conf = yaml.load(fh)
        except Exception as ex:
            logger.error("Unable to read config (%s): %s" % (self.path, ex))
            sys.exit(1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号