def loadCollection(self):
        data = SugarSync.getCollectionContentInfo(self.link, 'all', self.start, self.maxEntries)
        if data is None:
            print('Fatal Error on parsing collection content!')

        else:
            print('Wait and analyze the class')
            for collection in data.childs:
                tmp = None
                if collection.hasAttribute('type') and collection.getAttribute('type') == 'syncFolder':
                    tmp = SugarSyncDirectory(collection.ref)
                    tmp.setName(collection.displayName)
                    tmp.setParent(self)
                else:
                    tmp = SugarSyncFile(collection.ref)
                    tmp.setParent(self)

                if tmp is not None:
                    self.addChild(tmp)
Exemple #2
0
    def loadCollection(self):
        data = SugarSync.getCollectionContentInfo(self.link, 'all', self.start,
                                                  self.maxEntries)
        if data is None:
            print('Fatal Error on parsing collection content!')

        else:
            print('Wait and analyze the class')
            for collection in data.childs:
                tmp = None
                if collection.hasAttribute('type') and collection.getAttribute(
                        'type') == 'syncFolder':
                    tmp = SugarSyncDirectory(collection.ref)
                    tmp.setName(collection.displayName)
                    tmp.setParent(self)
                else:
                    tmp = SugarSyncFile(collection.ref)
                    tmp.setParent(self)

                if tmp is not None:
                    self.addChild(tmp)