From 7e1a1a23a9da75f2e1bdb6c1dc300ec2d34452e9 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 25 Aug 2019 00:06:35 +0200 Subject: [PATCH] Fix fallback of Group.__getattr__ on protected attributes. --- src/registry.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/registry.py b/src/registry.py index ce1b59983..b7ceb7d25 100644 --- a/src/registry.py +++ b/src/registry.py @@ -226,7 +226,8 @@ class Group(object): def __getattr__(self, attr): if attr.startswith('_'): - object.__getattr__(self, attr) + raise AttributeError('%s has no attribute %s' % + (self.__class__.__name__, attr)) elif attr in self._children: return self._children[attr] elif self._supplyDefault: