summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/os.py b/Lib/os.py
index abbadc4..40d117e 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -514,11 +514,7 @@ def getenv(key, default=None):
__all__.append("getenv")
def _exists(name):
- try:
- eval(name)
- return True
- except NameError:
- return False
+ return name in globals()
# Supply spawn*() (probably only for Unix)
if _exists("fork") and not _exists("spawnv") and _exists("execv"):