From: Zac Medico Date: Sun, 2 Dec 2012 22:15:05 +0000 (-0800) Subject: show_masked_packages: handle missing license file X-Git-Tag: v2.2.0_alpha145~5 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4551596377cf01904245611145be896314254582;p=portage.git show_masked_packages: handle missing license file This will fix bug #445628. --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 65a94ab37..568a11682 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -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)