diff options
-rw-r--r-- | pym/portage.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py index 7a8258547..3c026ebc6 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1615,6 +1615,14 @@ class config: """Called to implement membership test operators (in and not in).""" return bool(self.has_key(mykey)) + def setdefault(self, k, x=None): + if k in self: + return self[k] + else: + myvalue = x + self[k] = x + return myvalue + def keys(self): return unique_array(flatten([x.keys() for x in self.lookuplist])) |