Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: prebuilt.py

Issue 5357012: Use regular string ops, instead of urlparse.urljoin. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: prebuilt.py
diff --git a/prebuilt.py b/prebuilt.py
index 4baf95dab6451d51609f8ed57a99a39fed9f9550..607397ee8dcbc730a91011f6bd22a80be6af66d9 100755
--- a/prebuilt.py
+++ b/prebuilt.py
@@ -11,7 +11,6 @@ import re
import sys
import tempfile
import time
-import urlparse
from chromite.lib import cros_build_lib
from chromite.lib.binpkg import (GrabLocalPackageIndex, GrabRemotePackageIndex,
@@ -317,7 +316,7 @@ def GenerateUploadDict(base_local_path, base_remote_path, pkgs):
suffix = pkg['CPV'] + '.tbz2'
local_path = os.path.join(base_local_path, suffix)
assert os.path.exists(local_path)
- remote_path = urlparse.urljoin(base_remote_path, suffix)
+ remote_path = '%s/%s' % (base_remote_path.rstrip('/'), suffix)
upload_files[local_path] = remote_path
return upload_files
@@ -415,7 +414,7 @@ def UploadPrebuilt(build_path, upload_location, version, binhost_base_url,
git_file = os.path.join(build_path, DetermineMakeConfFile(board))
binhost_conf = os.path.join(build_path, _BINHOST_CONF_DIR, 'target',
'%s.conf' % board)
- remote_location = urlparse.urljoin(upload_location, url_suffix)
+ remote_location = '%s/%s' % (upload_location.rstrip('/'), url_suffix)
# Process Packages file, removing duplicates and filtered packages.
pkg_index = GrabLocalPackageIndex(package_path)
@@ -429,7 +428,7 @@ def UploadPrebuilt(build_path, upload_location, version, binhost_base_url,
if upload_location.startswith('gs://'):
# Build list of files to upload.
upload_files = GenerateUploadDict(package_path, remote_location, uploads)
- remote_file = urlparse.urljoin(remote_location, 'Packages')
+ remote_file = '%s/Packages' % remote_location.rstrip('/')
upload_files[tmp_packages_file.name] = remote_file
print 'Uploading %s' % package_string
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698