def fetch_remotes(self, remotes=None):
        '''
        Fetch all remotes and return a boolean to let the calling function know
        whether or not any remotes were updated in the process of fetching
        '''
        if remotes is None:
            remotes = []
        elif not isinstance(remotes, list):
            log.error(
                'Invalid \'remotes\' argument (%s) for fetch_remotes. '
                'Must be a list of strings', remotes
            )
            remotes = []

        changed = False
        for repo in self.remotes:
            name = getattr(repo, 'name', None)
            if not remotes or (repo.id, name) in remotes:
                try:
                    if repo.fetch():
                        # We can't just use the return value from repo.fetch()
                        # because the data could still have changed if old
                        # remotes were cleared above. Additionally, we're
                        # running this in a loop and later remotes without
                        # changes would override this value and make it
                        # incorrect.
                        changed = True
                except Exception as exc:
                    log.error(
                        'Exception caught while fetching %s remote \'%s\': %s',
                        self.role, repo.id, exc,
                        exc_info=True
                    )
        return changed
Fetch all remotes and return a boolean to let the calling function know
        whether or not any remotes were updated in the process of fetching