diff options
author | Guido van Rossum <guido@python.org> | 1995-08-07 20:15:23 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-08-07 20:15:23 (GMT) |
commit | b7677095d4ba143cc6d265cfde006bbcbccebcd7 (patch) | |
tree | e06691f82cba7486514f3f569206272ff7e8e472 /Lib | |
parent | 8755582ef1f5e5af95e162faa772c94c9baa6f33 (diff) | |
download | cpython-b7677095d4ba143cc6d265cfde006bbcbccebcd7.zip cpython-b7677095d4ba143cc6d265cfde006bbcbccebcd7.tar.gz cpython-b7677095d4ba143cc6d265cfde006bbcbccebcd7.tar.bz2 |
make sure os.environ exists (maybe empty)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/os.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |