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

Zdeněk Pavlas zpavlas at redhat.com
Thu Apr 19 13:23:32 UTC 2012


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).
---
 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')
 
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, '')
         if self.proxy not in empty:
             proxy_string = '%s' % self.proxy
             if self.proxy_username not in empty:
-- 
1.7.4.4



More information about the Yum-devel mailing list