summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/support.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py
index 132bc56..fb43f3d 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -890,7 +890,7 @@ def gc_collect():
def python_is_optimized():
"""Find if Python was built with optimizations."""
- cflags = sysconfig.get_config_vars()['PY_CFLAGS']
+ cflags = sysconfig.get_config_var('PY_CFLAGS') or ''
final_opt = ""
for opt in cflags.split():
if opt.startswith('-O'):