depgraph: fix possible REQUIRED_USE KeyError
authorZac Medico <zmedico@gentoo.org>
Wed, 9 Nov 2011 03:23:22 +0000 (19:23 -0800)
committerZac Medico <zmedico@gentoo.org>
Wed, 9 Nov 2011 03:23:22 +0000 (19:23 -0800)
This goes with commit a0961708ced50c90497811058eda6f4513d2986d.

pym/_emerge/depgraph.py

index 301b2521085088ef121c414eb627ae3b056dfeca..2296aa0012130f685ab79f39c8e4f4c03f6d46fc 100644 (file)
@@ -3114,7 +3114,7 @@ class depgraph(object):
                                        if untouchable_flags.intersection(involved_flags):
                                                continue
 
-                                       required_use = myparent.metadata["REQUIRED_USE"]
+                                       required_use = myparent.metadata.get("REQUIRED_USE")
                                        required_use_warning = ""
                                        if required_use:
                                                old_use = self._pkg_use_enabled(myparent)