config.py 文件源码

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

项目:Zabbix-Network-Weathermap 作者: Prototype-X 项目源码 文件源码
def load(self, path_cfg: str):
        with open(path_cfg, 'r') as stream:
            try:
                self.cfg_dict = yaml3ed.safe_load(stream)
            except yaml3ed.YAMLError as exc:
                print(exc)
        self.check()
        self.zbx = ZabbixAgent(self.cfg_dict['zabbix']['url'], self.cfg_dict['zabbix']['login'],
                               self.cfg_dict['zabbix']['password'])
        log.debug('Config loaded')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号