From 89a762dec27629d8ea5d88cc22998e612e772220 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 6 May 2011 23:44:54 +0200 Subject: [PATCH] Fix plugin chaining. When the last plugin of a chain was returning None, the whole chain return None instead of the last non-None result. For example, chain LessPlugin with UglifyPlugin and you get all your .less files unprocessed. --- hyde/plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hyde/plugin.py b/hyde/plugin.py index 2a24055..62a72fc 100644 --- a/hyde/plugin.py +++ b/hyde/plugin.py @@ -40,8 +40,9 @@ class PluginProxy(object): # "\tCalling plugin [%s]", # plugin.__class__.__name__) function = getattr(plugin, method_name) - res = function(*args) - if res: + newres = function(*args) + if newres: + res = newres targs = list(args) last = None if len(targs):