Re: [PATCH 09/14] Use temporary repo id for edited object to prevent Duplicate Repo error.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux