show_masked_packages: handle missing license file
authorZac Medico <zmedico@gentoo.org>
Sun, 2 Dec 2012 22:15:05 +0000 (14:15 -0800)
committerZac Medico <zmedico@gentoo.org>
Sun, 2 Dec 2012 22:15:05 +0000 (14:15 -0800)
This will fix bug #445628.

pym/_emerge/depgraph.py

index 65a94ab3773be7cfbb05e9272533e2d3e5d91e2f..568a116828f0f6f9b110e0799e67cdad391a6910 100644 (file)
@@ -7575,9 +7575,11 @@ def show_masked_packages(masked_packages):
                        shown_comments.add(comment)
                portdb = root_config.trees["porttree"].dbapi
                for l in missing_licenses:
-                       l_path = portdb.findLicensePath(l)
                        if l in shown_licenses:
                                continue
+                       l_path = portdb.findLicensePath(l)
+                       if l_path is None:
+                               continue
                        msg = ("A copy of the '%s' license" + \
                        " is located at '%s'.\n\n") % (l, l_path)
                        writemsg(msg, noiselevel=-1)