[Yum-devel] [PATCH] honor proxy=_none_ again. BZ 814224

James Antill james at fedoraproject.org
Thu Apr 19 14:16:32 UTC 2012


On Thu, 2012-04-19 at 15:23 +0200, Zdeněk Pavlas wrote:
> After commit b804e8d4fc88d _none_ evaluates to None (option not set).
> We should keep it as-is instead, because it was used to explicitly
> disable default proxies (set in ENV).

 Premature ACKing. Sorry.

> ---
>  yum/config.py  |    2 +-
>  yum/yumRepo.py |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/yum/config.py b/yum/config.py
> index fe7e1cb..81fe283 100644
> --- a/yum/config.py
> +++ b/yum/config.py
> @@ -216,7 +216,7 @@ class UrlOption(Option):
>          # Handle the "_none_" special case
>          if url.lower() == '_none_':
>              if self.allow_none:
> -                return None
> +                return '_none_'
>              else:
>                  raise ValueError('"_none_" is not a valid value')

 This needs an option, because mirrorlist and metalink use this option
class too ... and they aren't going to be happy with getting actual
_none_ values.

> diff --git a/yum/yumRepo.py b/yum/yumRepo.py
> index 1abd907..ebbbfcc 100644
> --- a/yum/yumRepo.py
> +++ b/yum/yumRepo.py
> @@ -433,7 +433,7 @@ class YumRepository(Repository, config.RepoConf):
>  
>          self._proxy_dict = {} # zap it
>          proxy_string = None
> -        empty = (None, '_none_', '')
> +        empty = (None, '')

 So I looked at the previous patch and assumed this would be ok ... but
a quick look at the urlgrabber in RHEL-5 shows it doesn't seem to
understand "_none_" as input. Easiest solution is probably to test
urlgrabber.__version__ and change it to empty.



More information about the Yum-devel mailing list