Пример #1
0
def checkCommand(signum, frame):
    seconds = 30
    handler = commandHandler.commandHandler()
    handler.handleCommand()
    msg = 'Sleeping for ' + str(seconds) + ' seconds'
    helper.printInfoVerbose(msg)
    signal.alarm(seconds)
Пример #2
0
 def sendMessage(self, command):
     command = self.prefix + command
     try:
         self.api.PostUpdate(command)
         helper.printInfoVerbose("Message send as command.")
     except:
         helper.printErrorVerbose("Message not send!")
Пример #3
0
def quit(signum, frame):
    helper.printInfoVerbose('Shutting down...')
    sys.exit(0)