From caf0b1e031a0515f42147184362e76e0767c478d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 30 Apr 2007 15:12:45 +0000 Subject: [PATCH] Handle KeyError when the ebuild is corrupt. svn path=/main/trunk/; revision=6461 --- pym/emerge/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index ed086fb74..5574d9327 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -1676,7 +1676,11 @@ class depgraph: print filename+":" print comment oldcomment = comment - licenses = portdb.aux_get(p, ["LICENSE"])[0] + try: + licenses = portdb.aux_get(p, ["LICENSE"])[0] + except KeyError: + # Corruption will have been reported above. + continue uselist = [] if "?" in licenses: pkgsettings.setcpv(p, mydb=portdb) -- 2.26.2