From 33e9f7c9c45465b510e861621372f38c5d4b960d Mon Sep 17 00:00:00 2001 From: Lakshmi Vyasarajan Date: Wed, 11 May 2011 10:59:12 +0530 Subject: [PATCH] Fixes for the chaining issue --- hyde/plugin.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hyde/plugin.py b/hyde/plugin.py index e881b41..6334095 100644 --- a/hyde/plugin.py +++ b/hyde/plugin.py @@ -41,12 +41,11 @@ class PluginProxy(object): # plugin.__class__.__name__) function = getattr(plugin, method_name) res = function(*args) - last = None - if res: - targs = list(args) - if len(targs): - last = targs.pop() - targs.append(res if res else last) + targs = list(args) + if len(targs): + last = targs.pop() + res = res if res else last + targs.append(res) args = tuple(targs) return res