summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
Diffstat (limited to 'apt')
-rw-r--r--apt/debfile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt/debfile.py b/apt/debfile.py
index 160a4a72..cd027c71 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -94,7 +94,8 @@ class DebPackage(object):
return pkgname
elif self._cache.is_virtual_package(pkgname):
return pkgname
- elif self._cache[pkgname].candidate.architecture == "all":
+ elif (pkgname in self._cache and
+ self._cache[pkgname].candidate.architecture == "all"):
return pkgname
# now do the real multiarch checking
multiarch_pkgname = "%s:%s" % (pkgname, self._multiarch)