After commit b804e8d4fc88d proxy=_none_ evaluates to None (option not set). Change the default so we can tell it apart. Pass _none_ as '' to urlgrabber. --- yum/config.py | 2 +- yum/yumRepo.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/yum/config.py b/yum/config.py index fe7e1cb..6446a6d 100644 --- a/yum/config.py +++ b/yum/config.py @@ -735,7 +735,7 @@ class YumConf(StartupConf): commands = ListOption() exclude = ListOption() failovermethod = Option(__main_failovermethod_default__) - proxy = UrlOption(schemes=('http', 'ftp', 'https'), allow_none=True) + proxy = UrlOption(default=False, schemes=('http', 'ftp', 'https'), allow_none=True) proxy_username = Option() proxy_password = Option() username = Option() diff --git a/yum/yumRepo.py b/yum/yumRepo.py index 1abd907..655bbaa 100644 --- a/yum/yumRepo.py +++ b/yum/yumRepo.py @@ -434,7 +434,9 @@ class YumRepository(Repository, config.RepoConf): self._proxy_dict = {} # zap it proxy_string = None empty = (None, '_none_', '') - if self.proxy not in empty: + if self.proxy is None: # got 'proxy=_none_' + proxy_string = '' # this disables default proxies + elif self.proxy: proxy_string = '%s' % self.proxy if self.proxy_username not in empty: -- 1.7.4.4 _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel