Exemplo n.º 1
0
    def load_invites(self):
        invite_list = []
        for item in SyncsController().load():
            try:
                localbox_client = LocalBox(url=item.url,
                                           label=item.label,
                                           path=item.path)

                result = localbox_client.get_invite_list(user=item.user)

                for invite in result:
                    invite_list.append(invite)
            except URLError:
                getLogger(__name__).exception(
                    'failed to get_share_list (%s, %s)' %
                    (item.url, item.label))
        return invite_list
Exemplo n.º 2
0
    def load_invites(self):
        self._list = []
        for item in SyncsController().load():
            try:
                localbox_client = LocalBox(url=item.url,
                                           label=item.label,
                                           path=item.path)

                for share in localbox_client.get_invite_list(user=item.user):
                    share_item = ShareItem(user=share['user'],
                                           path='/' + share['link_path'],
                                           url=item.url,
                                           label=item.label,
                                           id=share['id'],
                                           server='Local')
                    self._list.append(share_item)
            except URLError:
                getLogger(__name__).exception(
                    'failed to get_share_list (%s, %s)' %
                    (item.url, item.label))

        return self._list