def checkCommand(signum, frame): seconds = 30 handler = commandHandler.commandHandler() handler.handleCommand() msg = 'Sleeping for ' + str(seconds) + ' seconds' helper.printInfoVerbose(msg) signal.alarm(seconds)
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!")
def quit(signum, frame): helper.printInfoVerbose('Shutting down...') sys.exit(0)