Fix fallback of Group.__getattr__ on protected attributes.

This commit is contained in:
Valentin Lorentz 2019-08-25 00:06:35 +02:00
parent cac3de71b1
commit 7e1a1a23a9

View File

@ -226,7 +226,8 @@ class Group(object):
def __getattr__(self, attr): def __getattr__(self, attr):
if attr.startswith('_'): if attr.startswith('_'):
object.__getattr__(self, attr) raise AttributeError('%s has no attribute %s' %
(self.__class__.__name__, attr))
elif attr in self._children: elif attr in self._children:
return self._children[attr] return self._children[attr]
elif self._supplyDefault: elif self._supplyDefault: