[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [PATCH 09/14] Use temporary repo id for edited object to prevent Duplicate Repo error.
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Subject: Re: [PATCH 09/14] Use temporary repo id for edited object to prevent Duplicate Repo error.
- Date: Mon, 21 Sep 2009 14:04:14 -0400
> diff --git a/iw/task_gui.py b/iw/task_gui.py
> index c0f7688..061edb7 100644
> --- a/iw/task_gui.py
> +++ b/iw/task_gui.py
> @@ -350,7 +350,10 @@ class RepoEditor:
> # sure that if we're just editing the repo, we grab all the
> # attributes from the old one before deleting it.
> if self.repo:
> - newRepoObj = AnacondaYumRepo(self.repo.id)
> + # use temporary id so that we don't get Duplicate Repo error
> + # when adding
> + newRepoObj = AnacondaYumRepo("UIedited_%s" %
> + self.anaconda.backend.ayum.repoIDcounter.next())
> removeOld = True
> else:
> newRepoObj = AnacondaYumRepo(reponame.replace(" ", ""))
This looks fine, though I really dislike storing the counter in the
AnacondaYum object. Is there anywhere else it could go?
- Chris
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]