From 9ec23b6212ed3b930c1bb5133740de5c15c5b978 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 9 Jun 2013 20:50:16 -0700 Subject: [PATCH] _emerge_config: implement __iter__ --- pym/_emerge/actions.py | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.26.2