From 4fc58930373f30ec82578d5ea428167bf61d1d74 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 7 Aug 2018 21:35:20 -0700 Subject: [PATCH] Assume the raw environ is always declared. posixmodule.c always declares environ, so don't bother catching a NameError in os.py. --- Lib/os.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Lib/os.py b/Lib/os.py index 499e6285618f21..4b31e4dcc8add6 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -525,12 +525,6 @@ def _fwalk(topfd, toppath, isbytes, topdown, onerror, follow_symlinks): __all__.append("fwalk") -# Make sure os.environ exists, at least -try: - environ -except NameError: - environ = {} - def execl(file, *args): """execl(file, *args)