support break in iterator
This commit is contained in:
parent
39c8e2eb0b
commit
4f3db9cbc6
|
@ -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
|
||||
# ______________________________________________________________________
|
||||
|
|
Loading…
Reference in New Issue