__init__.py 文件源码

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

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

    return config
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号