Handle KeyError when the ebuild is corrupt.
authorZac Medico <zmedico@gentoo.org>
Mon, 30 Apr 2007 15:12:45 +0000 (15:12 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 30 Apr 2007 15:12:45 +0000 (15:12 -0000)
svn path=/main/trunk/; revision=6461

pym/emerge/__init__.py

index ed086fb744f044aa32a2106ed16dab3e267fbd00..5574d9327d5ee5c0f4b9dbe3cc09138469e024a3 100644 (file)
@@ -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)