From: Benjamin Peterson Date: Wed, 8 Aug 2018 04:51:12 +0000 (-0700) Subject: Assume the raw environ is always declared. (GH-8707) X-Git-Tag: v3.8.0a1~1230 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52dee687af3671a31f63d6432de0d9ef370fd7b0;p=python Assume the raw environ is always declared. (GH-8707) posixmodule.c always declares environ, so don't bother catching a NameError in os.py. --- diff --git a/Lib/os.py b/Lib/os.py index 499e628561..4b31e4dcc8 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -525,12 +525,6 @@ if {open, stat} <= supports_dir_fd and {scandir, stat} <= supports_fd: __all__.append("fwalk") -# Make sure os.environ exists, at least -try: - environ -except NameError: - environ = {} - def execl(file, *args): """execl(file, *args)