Пример #1
0
class ReloadCommunityListAction(ActionBase):
    def call(self):

        try:
            answer = getEVOAnswer("reloadCommunityList")
        except EVOControlledException, e:
            raise EVOException(
                'Error when parsing list of communities. Message from EVO Server: "'
                + e.message + '".')

        try:
            communityStringList = answer.split('&&')
            communities = {}

            ignoredCommunities = getEVOOptionValueByName("ingnoredCommunities")

            for communityString in communityStringList:
                id, name = communityString.split(',')
                id = id.strip()
                name = name.strip()
                if id not in ignoredCommunities:
                    communities[id] = name
            self._plugin.getOption("communityList").setValue(communities)

        except Exception, e:
            raise EVOException(
                'Error when parsing list of communities. Message from EVO Server: "'
                + answer + '". Exception ocurred: ' + str(e))
Пример #2
0
    def call(self):

        try:
            answer = getEVOAnswer("reloadCommunityList")
        except EVOControlledException, e:
            raise EVOException(
                'Error when parsing list of communities. Message from EVO Server: "'
                + e.message + '".')