From: Zac Medico Date: Mon, 10 Jun 2013 03:50:16 +0000 (-0700) Subject: _emerge_config: implement __iter__ X-Git-Tag: v2.2.0_alpha180~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ec23b6212ed3b930c1bb5133740de5c15c5b978;p=portage.git _emerge_config: implement __iter__ --- diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index c7139d4c3..2ee2a5bb3 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -3134,6 +3134,11 @@ class _emerge_config(SlotObject): __slots__ = ('action', 'args', 'mtimedb', 'opts', 'settings', 'trees') # Support unpack as tuple, for load_emerge_config backward compatibility. + def __iter__(self): + yield self.settings + yield self.trees + yield self.mtimedb + def __getitem__(self, index): if index == 0: return self.settings