From 86e08bdaf036b7b455514b3b6cde47523e9759f5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 14 Apr 2006 06:30:52 +0000 Subject: Add an initial_items parameter to the LazyItemsDict constructor in order to facilitate integration with existing dict based code. svn path=/main/trunk/; revision=3143 --- pym/portage.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'pym/portage.py') diff --git a/pym/portage.py b/pym/portage.py index 4f8c9423c..547085c24 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1414,14 +1414,8 @@ class config: global db, root self._use = autouse(db[root]["vartree"], *self._pargs, **self._kwargs) return self._use - if isinstance(self.configdict["auto"], - portage_util.LazyItemsDict): - lazy_values = self.configdict["auto"] - else: - lazy_values = portage_util.LazyItemsDict() - lazy_values.update(self.configdict["auto"]) - lazy_values.addLazyItem("USE", LazyAutouse(use_cache=use_cache)) - self.configdict["auto"] = lazy_values + self.configdict["auto"] = portage_util.LazyItemsDict(self.configdict["auto"]) + self.configdict["auto"].addLazyItem("USE", LazyAutouse(use_cache=use_cache)) else: self.configdict["auto"]["USE"]="" else: -- cgit v1.2.3-1-g7c22