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'])
评论列表
文章目录