def remove_patch(self, patch):
        """ Remove a patch from the patches list """
        self._check_patch(patch)
        patchline = self.patch2line[patch]
        del self.patch2line[patch]
        self.patchlines.remove(patchline)