def _origin(self):
        """
        Gets the remote that references origin by name self.origin_name.
        """
        origin = None

        for remote in self.repo.remotes:
            if remote.name == self.remote_name:
                origin = remote

        if not origin:
            raise MissingRemote('Could not find the remote named {0}'.format(
                self.remote_name))

        return origin

        Gets the remote that references origin by name self.origin_name.
        
src/gitsweep/base.py