Esempio n. 1
0
 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."
Esempio n. 2
0
    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."
Esempio n. 3
0
 def hook(cls, id):
     from Phoenix.Models import Hook
     if Hook.get(id):
         return True
     return False
Esempio n. 4
0
 def hook(cls, id):
     from Phoenix.Models import Hook
     if Hook.get(id):
         return True
     return False