summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-10-01 16:32:35 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-10-01 16:32:35 +0200
commit04ea8dd93af2c59fd58745e0aad6907307bb3047 (patch)
tree8d610706cb7f49ac2404cf373b9be7d1cf8931e5
parentd3d4d322614a44cf84a6f2b40bc21d09bbfb2405 (diff)
downloadpython-apt-04ea8dd93af2c59fd58745e0aad6907307bb3047.tar.gz
fix crash when a pkgname has no candidate
-rw-r--r--apt/debfile.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/apt/debfile.py b/apt/debfile.py
index 2eb807b8..1ebbea32 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -104,6 +104,7 @@ class DebPackage(object):
elif self._cache.is_virtual_package(pkgname):
return pkgname
elif (pkgname in self._cache and
+ self._cache[pkgname].candidate and
self._cache[pkgname].candidate.architecture == "all"):
return pkgname
# now do the real multiarch checking