Beispiel #1
0
    def do(self, *args, **kwargs):
        """ do the morphing. """

        try:
            return self.func(*args, **kwargs)
        except Exception, ex:
            handle_exception()
Beispiel #2
0
    def save(self):
        """ save fleet data and call save on all the bots. """

        for i in self.bots:
            try:
                i.save()
            except Exception, ex:
                handle_exception()
Beispiel #3
0
    def do(self, *args, **kwargs):

        """ do the morphing. """

        try:
            return self.func(*args, **kwargs)
        except Exception, ex:
            handle_exception()
Beispiel #4
0
    def save(self):

        """ save fleet data and call save on all the bots. """

        for i in self.bots:
            try:
                i.save()
            except Exception, ex:
                handle_exception()
Beispiel #5
0
    def exit(self, name=None, jabber=False):
        """ call exit on all bots. if jabber=True only jabberbots will exit """

        if not name:
            for i in self.bots:
                if jabber and not i.jabber:
                    pass
                else:
                    i.exit()
            return

        name = name.lower()

        for i in self.bots:
            if i.name == name:
                try:
                    i.exit()
                except:
                    handle_exception()
                self.remove(i)
                return 1
Beispiel #6
0
    def exit(self, name=None, jabber=False):

        """ call exit on all bots. if jabber=True only jabberbots will exit """

        
        if not name:
            for i in self.bots:
                if jabber and not i.jabber:
                    pass
                else:
                    i.exit()
            return

        name = name.lower()

        for i in self.bots:
            if i.name == name:
                try:
                    i.exit()
                except:
                    handle_exception()
                self.remove(i)
                return 1