1 Star 0 Fork 0

饭饭/depot_tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
appengine_mapper.py 685 Bytes
一键复制 编辑 原始数据 按行查看 历史
# Copyright (c) 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Ensures that all depot_tools talks directly to appengine to avoid SNI."""
import urlparse
mapping = {
'codereview.chromium.org': 'chromiumcodereview.appspot.com',
'crashpad.chromium.org': 'crashpad-home.appspot.com',
'bugs.chromium.org': 'monorail-prod.appspot.com',
'bugs-staging.chromium.org': 'monorail-staging.appspot.com',
}
def MapUrl(url):
parts = list(urlparse.urlsplit(url))
new_netloc = mapping.get(parts[1])
if new_netloc:
parts[1] = new_netloc
return urlparse.urlunsplit(parts)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/nicol/depot_tools.git
git@gitee.com:nicol/depot_tools.git
nicol
depot_tools
depot_tools
master

搜索帮助