'Sync repositories from GitHub API'

def sync_repositories(self):

    repos = self.paginate('https://api.github.com/user/repos?per_page=100')
    try:
        for repo in repos:
            self.create_repository(repo)
    except (TypeError, ValueError) as e:
        log.error('Error    syncing    GitHub    repositories:    %s', str(e), exc_info=True)
        raise Exception('Could    not    sync    your    GitHub    repositories,    try    reconnecting    your    account')
