[Piuparts-commits] [piuparts] 01/17: open_packages_url: pass urls without extension
Holger Levsen
holger at alioth.debian.org
Wed Nov 6 09:45:52 UTC 2013
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit 3318d3783d6c79cfe072a22a312a10226cc76a9a
Author: Andreas Beckmann <anbe at debian.org>
Date: Tue Nov 5 18:21:20 2013 +0100
open_packages_url: pass urls without extension
since .bz2 and .gz will be tried automatically
Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
piupartslib/__init__.py | 2 --
piupartslib/conf.py | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/piupartslib/__init__.py b/piupartslib/__init__.py
index 4eb6cd6..eb71e94 100644
--- a/piupartslib/__init__.py
+++ b/piupartslib/__init__.py
@@ -30,8 +30,6 @@ import packagesdb
def open_packages_url(url):
"""Open a Packages.bz2 file pointed to by a URL"""
- assert url.endswith(".bz2")
- url = url[:-len(".bz2")]
socket = None
for ext in ['.bz2', '.gz']:
try:
diff --git a/piupartslib/conf.py b/piupartslib/conf.py
index fcb79a2..3d1c24c 100644
--- a/piupartslib/conf.py
+++ b/piupartslib/conf.py
@@ -156,7 +156,7 @@ class DistroConfig(UserDict.UserDict):
return (self.get(distro, "candidates") or "").split() or [distro]
def _get_packages_url(self, distro, area, arch):
- return "%s/dists/%s/%s/binary-%s/Packages.bz2" % (
+ return "%s/dists/%s/%s/binary-%s/Packages" % (
self.get_mirror(distro),
self.get_distribution(distro),
area, arch)
@@ -166,7 +166,7 @@ class DistroConfig(UserDict.UserDict):
for d in self.get_candidates(distro)]
def _get_sources_url(self, distro, area):
- return "%s/dists/%s/%s/source/Sources.bz2" % (
+ return "%s/dists/%s/%s/source/Sources" % (
self.get_mirror(distro),
self.get_distribution(distro),
area)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list