[yum-commits] yum/config.py yum/yumRepo.py

zpavlas at osuosl.org zpavlas at osuosl.org
Thu Apr 19 14:16:45 UTC 2012


 yum/config.py  |    2 +-
 yum/yumRepo.py |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1b73d714a6084351d48db5d41abc985239144475
Author: Zdeněk Pavlas <zpavlas at redhat.com>
Date:   Thu Apr 19 15:14:29 2012 +0200

    honor proxy=_none_ again.  BZ 814224
    
    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).

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:


More information about the Yum-commits mailing list