# -*- coding: utf-8 -*-
hooks = {
    'newproject': [],        # (site)
    'generate': [],          # (site, tempdir)
    'publish': [],           # (site, s3)
    'install': [],           # (site, project)
}


class register_hook(object):
    """Register hook with @register_hook("EVENT") where EVENT is "newproject" etc"""
    def __init__(self, event):
        self.event = event

    def __call__(self, f):
        if f not in hooks[self.event]:
            hooks[self.event].append(f)
        return f

@@ -417,12 +417,186 @@
     
-if f
+# Avoid weird duplication%0A        names = %5B'%7B0%7D.%7B1%7D'.format(func.__module__, func.func_name) for func in hooks%5Bself.event%5D%5D%0A        if '%7B0%7D.%7B1%7D'.format(f.__module__, f.func_name)
  not

add fix for weird bucket duplication