summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt/package.py4
-rw-r--r--debian/changelog7
2 files changed, 10 insertions, 1 deletions
diff --git a/apt/package.py b/apt/package.py
index 0e13957f..ec88a456 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -491,7 +491,9 @@ class Package(object):
"""Return the candidate version of the package.
:since: 0.7.9"""
- return Version(self, self._pcache._depcache.GetCandidateVer(self._pkg))
+ cand = self._pcache._depcache.GetCandidateVer(self._pkg)
+ if cand is not None:
+ return Version(self, cand)
@property
def installed(self):
diff --git a/debian/changelog b/debian/changelog
index d9258436..83b00150 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-apt (0.7.10.3) unstable; urgency=low
+
+ * apt/package.py: Handle cases where no candidate is available, by returning
+ None in the candidate property. (Closes: #523801)
+
+ -- Julian Andres Klode <jak@debian.org> Sun, 12 Apr 2009 19:50:26 +0200
+
python-apt (0.7.10.2) unstable; urgency=low
* apt/package.py: Handle cases where no candidate is available and