def removehook(self): logging.info("Defining hook id ...") id = self.args.hook_id logging.info("Checking if hook exists ...") hook = Hook.get(id) if not hook: raise Exception("The hook with the id `%s' does not exist." % id) logging.info("Removing the hook from the database ...") hook.destroySelf() print "Done."
def removehook(self): logging.info("Defining hook id ...") id = self.args.hook_id logging.info("Checking if hook exists ...") hook = Hook.get(id) if not hook: raise Exception("The hook with the id `%s' does not exist." % id) logging.info("Removing the hook from the database ...") hook.destroySelf() print "Done."
def hook(cls, id): from Phoenix.Models import Hook if Hook.get(id): return True return False
def hook(cls, id): from Phoenix.Models import Hook if Hook.get(id): return True return False