Support command hooks not coming from a class instance

This commit is contained in:
jesopo 2018-09-29 09:44:13 +01:00
parent dfe5cb0be8
commit 746155fd57

View file

@ -92,7 +92,9 @@ class Module(ModuleManager.BaseModule):
buffer = target.buffer buffer = target.buffer
module_name = hook.function.__self__._name module_name = ""
if hasattr(hook.function, "__self__"):
module_name = hook.function.__self__._name
stdout, stderr = StdOut(module_name, target), StdErr(module_name, stdout, stderr = StdOut(module_name, target), StdErr(module_name,
target) target)