Skip to content

Commit

Permalink
Consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
akatrevorjay committed Jan 2, 2017
1 parent f275acd commit b4c3b80
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pysanity/proxy.py
Expand Up @@ -45,10 +45,12 @@ def find_attr(self, name, wrapped):
try:
return self.cache[name]
except KeyError:
obj = super(CachedAdapter, self).find_attr(name, wrapped)
# pass here to not chain exceptions in stack
pass
obj = super(CachedAdapter, self).find_attr(name, wrapped)

self.cache[name] = obj
return obj
self.cache[name] = obj
return obj


class PepifyProxy(wrapt.ObjectProxy):
Expand All @@ -69,7 +71,7 @@ def __getattr__(self, name):
try:
return super(PepifyProxy, self).__getattr__(name)
except AttributeError:
# pass here to not chain exceptions
# pass here to not chain exceptions in stack
pass
return self._self_adapter.find_attr(name, wrapped=self.__wrapped__)

Expand Down

0 comments on commit b4c3b80

Please sign in to comment.