summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 3c026ebc6..13495c3dc 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1619,9 +1619,14 @@ class config:
if k in self:
return self[k]
else:
- myvalue = x
self[k] = x
- return myvalue
+ return x
+
+ def get(self, k, x=None):
+ if k in self:
+ return self[k]
+ else:
+ return x
def keys(self):
return unique_array(flatten([x.keys() for x in self.lookuplist]))