Fix a KeyError when the profile doesn't define default USE.
authorZac Medico <zmedico@gentoo.org>
Tue, 31 Oct 2006 06:46:09 +0000 (06:46 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 31 Oct 2006 06:46:09 +0000 (06:46 -0000)
svn path=/main/trunk/; revision=4885

pym/portage.py

index c20b44a0c242ca22a04398544bbfc5b36d889f92..adb97c502ad633758a15419891e21e8ee8e36cd6 100644 (file)
@@ -1550,7 +1550,7 @@ class config:
                                if best_match:
                                        defaults.append(cpdict[best_match])
                defaults = " ".join(defaults)
-               if defaults != self.configdict["defaults"]["USE"]:
+               if defaults != self.configdict["defaults"].get("USE",""):
                        self.configdict["defaults"]["USE"] = defaults
                        has_changed = True
                useforce = []