mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
make sure os.environ exists (maybe empty)
This commit is contained in:
parent
8755582ef1
commit
b7677095d4
1 changed files with 4 additions and 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue