From: Barry Warsaw <barry@python.org>
Date: Thu, 25 Nov 2010 01:34:47 +0000 (+0000)
Subject: sys.abiflags may not be defined on all platforms.
X-Git-Tag: v3.2b1~215
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5eaa5fb5ae46ff323f37e69aa12c275d63e6d0e;p=python

sys.abiflags may not be defined on all platforms.
---

diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index fe8c990fb1..685c84ea5e 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -475,7 +475,11 @@ def get_config_vars(*args):
         _CONFIG_VARS['base'] = _PREFIX
         _CONFIG_VARS['platbase'] = _EXEC_PREFIX
         _CONFIG_VARS['projectbase'] = _PROJECT_BASE
-        _CONFIG_VARS['abiflags'] = sys.abiflags
+        try:
+            _CONFIG_VARS['abiflags'] = sys.abiflags
+        except AttributeError:
+            # sys.abiflags may not be defined on all platforms.
+            _CONFIG_VARS['abiflags'] = ''
 
         if os.name in ('nt', 'os2'):
             _init_non_posix(_CONFIG_VARS)