Browse Source

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.
main
Vincent Bernat 13 years ago
parent
commit
89a762dec2
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      hyde/plugin.py

+ 3
- 2
hyde/plugin.py View File

@@ -40,8 +40,9 @@ class PluginProxy(object):
# "\tCalling plugin [%s]", # "\tCalling plugin [%s]",
# plugin.__class__.__name__) # plugin.__class__.__name__)
function = getattr(plugin, method_name) function = getattr(plugin, method_name)
res = function(*args)
if res:
newres = function(*args)
if newres:
res = newres
targs = list(args) targs = list(args)
last = None last = None
if len(targs): if len(targs):


Loading…
Cancel
Save