summaryrefslogtreecommitdiff
path: root/Lib/os.py
diff options
context:
space:
mode:
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 14dc908827..d974c59fa0 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