Remove meaningless default value in __get__()
In function object.__get__(self, instance, owner), owner is always the owner class, while instance is the instance that the attribute was accessed through, or None when the attribute is accessed through the owner. Setting owner default value makes no sense. refer to: http://python-reference.readthedocs.org/en/latest/docs/dunderdsc/get.html#get Change-Id: I2089fd75238e5faefb44ee5125b92f1ee29d8e2d
This commit is contained in:
parent
2a0cc7cbd1
commit
9d864e80a7
@ -60,7 +60,7 @@ class ExceptionFilter(object):
|
|||||||
self._should_ignore_ex = should_ignore_ex
|
self._should_ignore_ex = should_ignore_ex
|
||||||
functools.update_wrapper(self, should_ignore_ex)
|
functools.update_wrapper(self, should_ignore_ex)
|
||||||
|
|
||||||
def __get__(self, obj, owner=None):
|
def __get__(self, obj, owner):
|
||||||
return type(self)(six.create_bound_method(self._should_ignore_ex, obj))
|
return type(self)(six.create_bound_method(self._should_ignore_ex, obj))
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user