main.py 文件源码

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

项目:LinkR 作者: Toure 项目源码 文件源码
def _upload(url, data_file, username, password):
        """
        Upload will submit a results file via polarion ReST interface.
        """
        url_match = '(http(s)?)\:\/\/localhost'
        if re.search(url_match, url):
            print("Please configure url settings.")
            exit(1)

        polarion_request = post(url,
                                data=data_file,
                                auth=auth.HTTPBasicAuth(username,
                                                        password))
        status_code = polarion_request.status_code
        if status_code == codes.ok:
            return status_code
        else:
            print("Results upload failed with the follow: {}".format(
                polarion_request.status_code))
            raise exceptions.RequestException
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号