From 746155fd57b53717c9584e252040399e4327b024 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 29 Sep 2018 09:44:13 +0100 Subject: Support command hooks not coming from a class instance --- modules/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/commands.py b/modules/commands.py index c60876c3..d98a7e23 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -92,7 +92,9 @@ class Module(ModuleManager.BaseModule): 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, target) -- cgit v1.3.1-10-gc9f91