Merged from trunk 6460:6461
authorFabian Groffen <grobian@gentoo.org>
Tue, 1 May 2007 07:40:41 +0000 (07:40 -0000)
committerFabian Groffen <grobian@gentoo.org>
Tue, 1 May 2007 07:40:41 +0000 (07:40 -0000)
   +------------------------------------------------------------------------+
   | 6461    | Handle KeyError when the ebuild is corrupt.                  |
   | zmedico |                                                              |
   +------------------------------------------------------------------------+

svn path=/main/branches/prefix/; revision=6463

pym/emerge/__init__.py

index d01b4500b35fff54b4ccf285f02539f9ce272338..9347b6e9ad4ca475276c70ded685143ca6067d24 100644 (file)
@@ -1677,7 +1677,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)