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

Re: [PATCH 1/3] If getting .treeinfo fails, try treeinfo (#635065).



On Wed, 2010-12-01 at 09:21 -0500, Chris Lumens wrote:
> ---
>  yuminstall.py |   13 +++++++++----
>  1 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/yuminstall.py b/yuminstall.py
> index abcd283..a38bdf7 100644
> --- a/yuminstall.py
> +++ b/yuminstall.py
> @@ -689,13 +689,18 @@ class AnacondaYum(YumSorter):
>                      return None
>                  urlgrabber.grabber.reset_curl_obj()
>  
> +        ug = URLGrabber()
> +
>          try:
> -            ug = URLGrabber()
>              ug.urlgrab("%s/.treeinfo" % baseurl, "/tmp/.treeinfo", copy_local=1)
> -            return "/tmp/.treeinfo"
>          except Exception as e:
> -            log.error("Error downloading %s/.treeinfo: %s" % (baseurl, e))
> -            return None
> +            try:
> +                ug.urlgrab("%s/treeinfo", baseurl, "/tmp/.treeinfo", copy_local=1)
> +            except Exception as e:
> +                log.error("Error downloading treeinfo file: %s" % (baseurl, e))

also you have 2 items, and just one %s

> +                return None
> +
> +        return "/tmp/.treeinfo"
>  
>      # We need to make sure $releasever gets set up before .repo files are
>      # read.  Since there's no redhat-release package in /mnt/sysimage (and

-- 
Martin Gracik <mgracik redhat com>


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