def norecurse(fn):
    """
    Decorator which prevents recursive calling of an object method
    """
    def _wrapper(*args):
        self = args[0]
        if not self.updating:
            try:
                self.updating = True
                return fn(*args)
            finally:
                self.updating = False
    return _wrapper