]> granicus.if.org Git - python/commitdiff
PY_CFLAGS doesn't exist under Windows
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 31 Oct 2010 11:34:47 +0000 (11:34 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 31 Oct 2010 11:34:47 +0000 (11:34 +0000)
Lib/test/support.py

index 132bc562f6eecde82318f03f0f407c65229cc9b3..fb43f3dbc5ed658a7c3fb837955121e6d49c0f53 100644 (file)
@@ -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'):