Allow handle_error to decorate its instances

This commit is contained in:
Vgr E. Barry 2016-11-16 08:20:02 -05:00
parent be2d33dbe6
commit abd2dd149d

View File

@ -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