tempestmail.py 文件源码

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

项目:dci-ansible-agent 作者: redhat-cip 项目源码 文件源码
def get_index(self):
        '''Get index page of periodic job and returns all links to jobs'''
        url = urljoin(self.config.log_url, self.args.job)
        res = get_html(url)
        if res is None or not res.ok:
            return []

        body = res.content.decode() if res.content else ''
        hrefs = [HREF.search(l).group(1)
                 for l in body.splitlines() if HREF.search(l)]
        links = ["/".join((url, link))
                 for link in hrefs if JOBRE.match(link)]
        if links:
            # Number of links to return
            return links[:NLINKS]
        else:
            return []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号