summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-08-07 20:15:23 (GMT)
committerGuido van Rossum <guido@python.org>1995-08-07 20:15:23 (GMT)
commitb7677095d4ba143cc6d265cfde006bbcbccebcd7 (patch)
treee06691f82cba7486514f3f569206272ff7e8e472 /Lib/os.py
parent8755582ef1f5e5af95e162faa772c94c9baa6f33 (diff)
downloadcpython-b7677095d4ba143cc6d265cfde006bbcbccebcd7.zip
cpython-b7677095d4ba143cc6d265cfde006bbcbccebcd7.tar.gz
cpython-b7677095d4ba143cc6d265cfde006bbcbccebcd7.tar.bz2
make sure os.environ exists (maybe empty)
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 14dc908..d974c59 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -40,6 +40,10 @@ for name in _osindex.keys():
exec 'from %s import _exit' % name
except ImportError:
pass
+ try:
+ environ
+ except:
+ environ = {} # Make sure os.environ exists, at least
break
else:
del name