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

Unified Diff: chromite/lib/binpkg.py

Issue 5542002: Switch from gsdview.appspot.com to commondatastorage.googleapis.com. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: 80 chars Created 10 years 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 | prebuilt.py » ('j') | prebuilt.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromite/lib/binpkg.py
diff --git a/chromite/lib/binpkg.py b/chromite/lib/binpkg.py
index 75c86bcbac179519ff6fd2690c59a53b457caed7..a594571cfa13a5c393a0c11413a0dc8a13c781db 100644
--- a/chromite/lib/binpkg.py
+++ b/chromite/lib/binpkg.py
@@ -10,6 +10,7 @@ import operator
import os
import tempfile
import time
+import urllib
import urllib2
class PackageIndex(object):
@@ -52,7 +53,7 @@ class PackageIndex(object):
for pkg in self.packages:
cpv, sha1 = pkg['CPV'], pkg.get('SHA1')
if sha1:
- path = pkg.get('PATH', cpv + '.tbz2')
+ path = pkg.get('PATH', urllib.quote(cpv + '.tbz2'))
db[sha1] = '%s/%s' % (uri.rstrip('/'), path)
def _ReadPkgIndex(self, pkgfile):
@@ -200,7 +201,8 @@ class PackageIndex(object):
"""
self.header['URI'] = base_uri
for pkg in self.packages:
- pkg['PATH'] = '%s/%s' % (path_prefix.rstrip('/'), pkg['CPV'] + '.tbz2')
+ path = urllib.quote(pkg['CPV'] + '.tbz2')
+ pkg['PATH'] = '%s/%s' % (path_prefix.rstrip('/'), path)
def Write(self, pkgfile):
"""Write a packages file to disk.
« no previous file with comments | « no previous file | prebuilt.py » ('j') | prebuilt.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698