Fix issue 10094, by narrowing down the test for PROXY environment variables.
authorBarry Warsaw <barry@python.org>
Thu, 14 Oct 2010 18:23:53 +0000 (18:23 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 14 Oct 2010 18:23:53 +0000 (18:23 +0000)
Ubuntu 10.10 introduced $UBUNTU_MENUPROXY into the default user environment,
and that's what's tripping up the code.

Lib/test/test_urllib.py

index 4d389d72e4ebf8bb8a7b07b2a1463657f10fe665..13aa7b39d31f83ffc2bb9c8800cddd5f919b287c 100644 (file)
@@ -121,7 +121,7 @@ class ProxyTests(unittest.TestCase):
         self.env = support.EnvironmentVarGuard()
         # Delete all proxy related env vars
         for k in os.environ.keys():
-            if 'proxy' in k.lower():
+            if k == 'NO_PROXY':
                 self.env.unset(k)
 
     def tearDown(self):