Re: [PATCH 02/14] Make _enableRepo a bit cleaner.

[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 12e3558..bb69dba 100644
> --- a/iw/task_gui.py
> +++ b/iw/task_gui.py
> @@ -170,10 +170,9 @@ class RepoEditor:
>          except:
>              return 0
>  
> -    def _enableRepo(self, repo):
> +    def _addAndEnableRepo(self, repo):
>          try:
>              self.backend.ayum.repos.add(repo)
> -            self.backend.ayum.repos.enableRepo(repo.id)
>          except yum.Errors.DuplicateRepoError, e:
>              self.intf.messageWindow(_("Error"),
>                    _("The repository %s has already been added.  Please "
> @@ -181,6 +180,7 @@ class RepoEditor:
>                      "URL.") % self.repo.name, type="ok", custom_icon="error")
>              return False
>  
> +        repo.enable()
>          return True
>  
>      def _validURL(self, url):

This looks fine, though I don't really see why one way's any better than
another here.

- 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