cprp.py 文件源码

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

项目:fedoidc 作者: OpenIDC 项目源码 文件源码
def index(self, uid='', iss=''):
        link = ''
        if iss:
            link = iss
        elif uid:
            try:
                link = self.rph.find_srv_discovery_url(
                    resource="acct:{}".format(uid))
            except requests.ConnectionError:
                raise cherrypy.HTTPError(
                    message="Webfinger lookup failed, connection error")
        else:
            fname = os.path.join(self.html_home, 'opbyuid.html')
            return as_bytes(open(fname, 'r').read())

        if link:
            resp_headers = self.rph.begin(link)
            raise cherrypy.HTTPRedirect(resp_headers['Location'])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号