[Python-checkins] cpython: Correction for 4f82b6cfee46.

richard.oudkerk python-checkins at python.org
Tue May 7 15:38:35 CEST 2013


http://hg.python.org/cpython/rev/32067784f198
changeset: 83672:32067784f198
user: Richard Oudkerk <shibturn at gmail.com>
date: Tue May 07 14:36:51 2013 +0100
summary:
 Correction for 4f82b6cfee46.
files:
 Lib/os.py | 7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Lib/os.py b/Lib/os.py
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -686,16 +686,21 @@
 self[key] = value
 return self[key]
 
-# if putenv or unsetenv exist they should already be in __all__
 try:
 _putenv = putenv
 except NameError:
 _putenv = lambda key, value: None
+else:
+ if "putenv" not in __all__:
+ __all__.append("putenv")
 
 try:
 _unsetenv = unsetenv
 except NameError:
 _unsetenv = lambda key: _putenv(key, "")
+else:
+ if "unsetenv" not in __all__:
+ __all__.append("unsetenv")
 
 def _createenviron():
 if name == 'nt':
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /