Re: [PATCH 6/8] Protect YumPayload properties from some threading-related tracebacks.

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

 



> @@ -671,40 +676,48 @@ reposdir=%s
>          if repo_id in self.repos:
>              self._yum.repos.disableRepo(repo_id)
>  
> -            self._groups = []
> +            self._groups = None
>              self._packages = []
>  
>      ###
>      ### METHODS FOR WORKING WITH GROUPS
>      ###
>      @property
> +    def yumGroups(self):
> +        with _yum_lock:
> +            if not self._groups:
> +                if not self.needsNetwork or hasActiveNetDev():
> +                    try:
> +                        self._groups = self._yum.comps
> +                    except (RepoError, GroupsError) as e:
> +                        log.error("failed to get group info: %s" % e)
> +
> +        return self._groups
> +
> +    @property
>      def groups(self):
>          from yum.Errors import RepoError
>          from yum.Errors import GroupsError

I'd like to see a comment for each of these so I can remember what the
difference between the two is.

Aside from that, this set looks fine.

- 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