Fix traceback in _show_unsatisfied_dep, reported on forums:
authorZac Medico <zmedico@gentoo.org>
Tue, 25 May 2010 08:20:37 +0000 (01:20 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 25 May 2010 08:20:37 +0000 (01:20 -0700)
http://forums.gentoo.org/viewtopic-t-829445.html?sid=58b3b5cec88b8e2ffebc9991c90a473e

  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 2273, in _show_unsatisfied_dep
    if not (violated_atom.use.enabled or violated_atom.use.disabled):
AttributeError: 'NoneType' object has no attribute 'enabled'

pym/_emerge/depgraph.py

index c8b460396f291248d87c96c8aa7f5a90931a54dc..3a35e84e9cf224a60205c325419ca5a0d90e0e23 100644 (file)
@@ -2270,7 +2270,8 @@ class depgraph(object):
                                # If so, suggest to change them on the parent.
                                mreasons = []
                                violated_atom = atom.unevaluated_atom.violated_conditionals(myparent.use.enabled, pkg.use.enabled)
-                               if not (violated_atom.use.enabled or violated_atom.use.disabled):
+                               if violated_atom.use and not \
+                                       (violated_atom.use.enabled or violated_atom.use.disabled):
                                        #all violated use deps are conditional
                                        changes = []
                                        conditional = violated_atom.use.conditional