Skip to content

Commit 52dee68

Browse files
authored
Assume the raw environ is always declared. (GH-8707)
posixmodule.c always declares environ, so don't bother catching a NameError in os.py.
1 parent db8707c commit 52dee68

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Lib/os.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -525,12 +525,6 @@ def _fwalk(topfd, toppath, isbytes, topdown, onerror, follow_symlinks):
525525

526526
__all__.append("fwalk")
527527

528-
# Make sure os.environ exists, at least
529-
try:
530-
environ
531-
except NameError:
532-
environ = {}
533-
534528
def execl(file, *args):
535529
"""execl(file, *args)
536530

0 commit comments

Comments
 (0)