Bug 832202 - Handle empty lists from config.status in buildconfig.py. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 19 Jan 2013 09:46:51 +0100
changeset 119351 6b280e1554845df3eff6a6ef1f885ab6a64f4489
parent 119350 204b95febb133df8062ab60e393ca8b654f31d07
child 119352 a523c072eceddc0cae30099551d77e3a7cab01cb
push idunknown
push userunknown
push dateunknown
reviewersted
bugs832202
milestone21.0a1
Bug 832202 - Handle empty lists from config.status in buildconfig.py. r=ted
build/buildconfig.py
--- a/build/buildconfig.py
+++ b/build/buildconfig.py
@@ -17,11 +17,11 @@ path = os.path.join(path, 'config.status
 config = imp.load_module('_buildconfig', open(path), path, ('', 'r', imp.PY_SOURCE))
 
 for var in os.environ:
     if var in config.substs:
         config.substs[var] = os.environ[var]
 
 for var in config.__all__:
     value = getattr(config, var)
-    if isinstance(value, list) and isinstance(value[0], tuple):
+    if isinstance(value, list) and value and isinstance(value[0], tuple):
         value = dict(value)
     setattr(sys.modules[__name__], var, value)