Allow handle_error to decorate its instances
This commit is contained in:
parent
be2d33dbe6
commit
abd2dd149d
@ -161,6 +161,9 @@ class handle_error:
|
||||
if isinstance(func, cls) and instance is func.instance: # already decorated
|
||||
return func
|
||||
|
||||
if isinstance(func, cls):
|
||||
func = func.func
|
||||
|
||||
self = super().__new__(cls)
|
||||
self.instance = instance
|
||||
self.func = func
|
||||
|
Loading…
x
Reference in New Issue
Block a user