commit 50c2539d7cfdf7cb8b07c58791ef29fb91cd9045 Author: Damian Johnson atagar@torproject.org Date: Wed Jan 25 18:28:31 2017 -0800
Drop unnecessary check in descriptor accessor
The following conditional already checks if the attribute we're after is among a certain set. No need for this check too. --- stem/descriptor/__init__.py | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py index 1262f6a..0d4e73e 100644 --- a/stem/descriptor/__init__.py +++ b/stem/descriptor/__init__.py @@ -642,12 +642,6 @@ class Descriptor(object): return stem.util.str_tools._to_unicode(digest_hash.hexdigest().upper())
def __getattr__(self, name): - # Our constructor sets these, but when unpickling we might lack them. This - # check is needed to avoid an infinite loop in that case. - - if name in ('_lazy_loading', 'ATTRIBUTES'): - return super(Descriptor, self).__getattribute__(name) - # If an attribute we should have isn't present it means either... # # a. we still need to lazy load this