mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +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
|
exec 'from %s import _exit' % name
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
|
environ
|
||||||
|
except:
|
||||||
|
environ = {} # Make sure os.environ exists, at least
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
del name
|
del name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue