From 4f3db9cbc6c1216634d270c2154a6e30f3c692ae Mon Sep 17 00:00:00 2001 From: Garette Emmanuel Date: Mon, 25 Mar 2013 14:21:30 +0100 Subject: [PATCH] support break in iterator --- tiramisu/config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tiramisu/config.py b/tiramisu/config.py index 3ad66be..c47932a 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -378,6 +378,8 @@ class Config(object): if not isinstance(child, OptionDescription): try: yield child._name, getattr(self, child._name) + except GeneratorExit: + raise StopIteration except: pass # option with properties @@ -387,6 +389,8 @@ class Config(object): for child in self._cfgimpl_descr._children: try: yield child._name, getattr(self, child._name) + except GeneratorExit: + raise StopIteration except: pass # option with properties @@ -411,6 +415,8 @@ class Config(object): yield child._name, getattr(self, child._name) else: yield child._name, getattr(self, child._name) + except GeneratorExit: + raise StopIteration except: pass # ______________________________________________________________________