summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-02-13 18:36:57 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-02-13 18:36:57 +0100
commit4d7d86374effe9bfd3a360aaaa7b09758f5c948e (patch)
tree3ab29d32f4c1bd6adfd64b135f5e672c26637d00
parenta4bee532559a5022e54dac4cfbd9da23c7434a2f (diff)
downloadpython-apt-4d7d86374effe9bfd3a360aaaa7b09758f5c948e.tar.gz
* fixed crash in Mirror.has_repository
* fixed docstring
-rw-r--r--aptsources/distinfo.py8
-rw-r--r--aptsources/distro.py2
-rw-r--r--debian/changelog12
-rw-r--r--debian/control2
4 files changed, 20 insertions, 4 deletions
diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py
index f3c68cae..261243b4 100644
--- a/aptsources/distinfo.py
+++ b/aptsources/distinfo.py
@@ -91,8 +91,12 @@ class Mirror:
def get_repositories_for_proto(self, proto):
return filter(lambda r: r.proto == proto, self.repositories)
def has_repository(self, proto, dir):
- return len(filter(lambda r: (r.proto == proto) and dir in r.dir,
- self.repositories)) > 0
+ if dir is None:
+ return False
+ for r in self.repositories:
+ if r.proto == proto and dir in r.dir:
+ return True
+ return False
def get_repo_urls(self):
return map(lambda r: r.get_url(self.hostname), self.repositories)
def get_location(self):
diff --git a/aptsources/distro.py b/aptsources/distro.py
index f53783dc..9643524b 100644
--- a/aptsources/distro.py
+++ b/aptsources/distro.py
@@ -174,7 +174,6 @@ class Distribution:
Enable a component in all main, child and source code sources
(excluding cdrom based sources)
- sourceslist: an aptsource.sources_list
comp: the component that should be enabled
"""
def add_component_only_once(source, comps_per_dist):
@@ -427,3 +426,4 @@ def get_distro():
release)
else:
return Distribution(id, codename, description, relase)
+
diff --git a/debian/changelog b/debian/changelog
index 9380ddbb..e5a5b660 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+python-apt (0.6.20ubuntu5) feisty; urgency=low
+
+ * be more robust in has_repository (LP#84897)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 13 Feb 2007 17:49:55 +0100
+
+python-apt (0.6.20ubuntu4) feisty; urgency=low
+
+ * rebuild against latest libapt
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 6 Feb 2007 16:40:37 +0100
+
python-apt (0.6.20ubuntu3) feisty; urgency=low
* fixes in the new 'aptsources' module
diff --git a/debian/control b/debian/control
index 9e304c29..bf1ca1de 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: APT Development Team <deity@lists.debian.org>
Uploaders: Matt Zimmerman <mdz@debian.org>, Michael Vogt <mvo@debian.org>
Standards-Version: 3.7.2
XS-Python-Version: all
-Build-Depends: debhelper (>= 5.0.37.1), libapt-pkg-dev (>= 0.6.45), apt-utils, python-all-dev, python-distutils-extra, cdbs, python-central (>= 0.5)
+Build-Depends: debhelper (>= 5.0.37.1), libapt-pkg-dev (>= 0.6.46.4ubuntu7), apt-utils, python-all-dev, python-distutils-extra, cdbs, python-central (>= 0.5)
Package: python-apt
Architecture: any