Suppress exception while updating wrapper object in Python2 (PY-18078)

This commit is contained in:
Elizaveta Shashkova
2015-12-28 14:55:43 +03:00
parent 74a6cb2448
commit d7e8813e68
@@ -22,7 +22,10 @@ def wrap_attr(obj, attr):
class ObjectWrapper(object):
def __init__(self, obj):
self.wrapped_object = obj
functools.update_wrapper(self, obj)
try:
functools.update_wrapper(self, obj)
except:
pass
def __getattr__(self, attr):
orig_attr = getattr(self.wrapped_object, attr) #.__getattribute__(attr)