From: Zac Medico Date: Mon, 4 Dec 2006 00:47:00 +0000 (-0000) Subject: When portdbapi.aux_get() generates a KeyError in portage.getmaskingstatus(), handle... X-Git-Tag: v2.1.2~404 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=783c3966752cb73cb3a339119a388061c97ae1ea;p=portage.git When portdbapi.aux_get() generates a KeyError in portage.getmaskingstatus(), handle it by reporting "corruption". svn path=/main/trunk/; revision=5166 --- diff --git a/pym/portage.py b/pym/portage.py index 5dbd3a7f8..dbfe5605b 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -4128,7 +4128,12 @@ def getmaskingstatus(mycpv, settings=None, portdb=None): rValue.append("package.mask") # keywords checking - mygroups, eapi = portdb.aux_get(mycpv, ["KEYWORDS", "EAPI"]) + try: + mygroups, eapi = portdb.aux_get(mycpv, ["KEYWORDS", "EAPI"]) + except KeyError: + # The "depend" phase apparently failed for some reason. An associated + # error message will have already been printed to stderr. + return ["corruption"] if not eapi_is_supported(eapi): return ["required EAPI %s, supported EAPI %s" % (eapi, portage_const.EAPI)] mygroups = mygroups.split()