[Python-checkins] r86023 - python/branches/py3k/Lib/test/support.py

antoine.pitrou python-checkins at python.org
Sun Oct 31 12:34:47 CET 2010


Author: antoine.pitrou
Date: Sun Oct 31 12:34:47 2010
New Revision: 86023

Log:
PY_CFLAGS doesn't exist under Windows



Modified:
   python/branches/py3k/Lib/test/support.py

Modified: python/branches/py3k/Lib/test/support.py
==============================================================================
--- python/branches/py3k/Lib/test/support.py	(original)
+++ python/branches/py3k/Lib/test/support.py	Sun Oct 31 12:34:47 2010
@@ -890,7 +890,7 @@
 
 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'):


More information about the Python-checkins mailing list