gerrit_util.py 文件源码

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

项目:node-gn 作者: Shouqun 项目源码 文件源码
def get_auth_header(self, host):
    auth = None
    for domain, creds in self.gitcookies.iteritems():
      if cookielib.domain_match(host, domain):
        auth = (creds[0], None, creds[1])
        break

    if not auth:
      auth = self.netrc.authenticators(host)
    if auth:
      return 'Basic %s' % (base64.b64encode('%s:%s' % (auth[0], auth[2])))
    return None


# Backwards compatibility just in case somebody imports this outside of
# depot_tools.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号