From: Alec Warner Date: Fri, 7 Apr 2006 00:50:52 +0000 (-0000) Subject: Speed up portage.config.keys() X-Git-Tag: v2.1_pre8~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2ebcac9f64f29e85b702b9854e365671cb53586e;p=portage.git Speed up portage.config.keys() svn path=/main/trunk/; revision=3086 --- diff --git a/pym/portage.py b/pym/portage.py index 2cfbed407..d8e26cb9e 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1612,12 +1612,7 @@ class config: return bool(self.has_key(mykey)) def keys(self): - mykeys=[] - for x in self.lookuplist: - for y in x.keys(): - if y not in mykeys: - mykeys.append(y) - return mykeys + return unique_array(flatten([x.keys() for x in self.lookuplist])) def __setitem__(self,mykey,myvalue): "set a value; will be thrown away at reset() time"