[issue1287] os.environ.pop doesn't work

Raghuram Devarakonda report at bugs.python.org
Thu Oct 25 15:54:58 CEST 2007


Raghuram Devarakonda added the comment:

After reading the change, I think one more small change may be required.

Index: Lib/os.py
===================================================================
--- Lib/os.py   (revision 58654)
+++ Lib/os.py   (working copy)
@@ -452,7 +452,7 @@
                         del self.data[key]
                 def pop(self, key, *args):
                     unsetenv(key)
-                    return self.data.pop(key, *args)
+                    return self.data.pop(key.upper(), *args)
             def has_key(self, key):
                 return key.upper() in self.data
             def __contains__(self, key):

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1287>
__________________________________


More information about the Python-bugs-list mailing list