[PATCH master/rhel7-branch 1/2] Adds additional debug logging to yumpayload.py.

David Shea dshea at redhat.com
Fri Oct 18 21:08:01 UTC 2013


On 10/18/2013 02:15 PM, mulhern wrote:
> It is sometimes useful to log creation of yum .repo files.
>
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
>   pyanaconda/packaging/yumpayload.py | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
> index f14bd62..923324d 100644
> --- a/pyanaconda/packaging/yumpayload.py
> +++ b/pyanaconda/packaging/yumpayload.py
> @@ -303,6 +303,7 @@ reposdir=%s
>   
>           for repo in self._yum.repos.listEnabled():
>               cfg_path = "%s/%s.repo" % (self._repos_dir, repo.id)
> +            log.debug("writing repository file %s for repository %s" % (cfg_path, repo.id))
>               ks_repo = self.getAddOnRepo(repo.id)
>               with open(cfg_path, "w") as f:
>                   f.write("[%s]\n" % repo.id)
Minor nitpick, pylint complains about log functions called with % 
instead of parameters passed as a list; i.e., log.debug("writing 
repository file %s for repo %s", cfg_path, repo.id). Otherwise, yes, log 
this.


More information about the anaconda-patches mailing list