[New-bugs-announce] [issue7026] test_urllib: unsetting missing 'env' variable

Sridhar Ratnakumar report at bugs.python.org
Thu Oct 1 02:49:10 CEST 2009

New submission from Sridhar Ratnakumar <sridharr at activestate.com>:

test test_urllib failed -- Traceback (most recent call last):
  File "/home/apy/rrun/tmp/autotest/apy/lib/python2.6/test/
test_urllib.py", line 106, in setUp
NameError: global name 'env' is not defined

Looking in trunk's copy I see this:

    def setUp(self):
        # Records changes to env vars
        self.env = test_support.EnvironmentVarGuard()
        # Delete all proxy related env vars
        for k, v in os.environ.iteritems():
            if 'proxy' in k.lower():
                del env[k]

Should not that be "del self.env[k]"?

components: Tests
messages: 93384
nosy: srid
severity: normal
status: open
title: test_urllib: unsetting missing 'env' variable
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list