CHROMIUM: config: fix splitconfig to work with python2.5
authorMandeep Singh Baines <msb@chromium.org>
Thu, 1 Apr 2010 00:56:50 +0000 (17:56 -0700)
committerGrant Grundler <grundler@google.com>
Thu, 24 May 2012 22:06:03 +0000 (15:06 -0700)
set.intersection only began to support multiple iterables after python2.6

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/1593004

chromeos/scripts/splitconfig

index 870556b..262fa20 100755 (executable)
@@ -28,10 +28,9 @@ for config in os.listdir("."):
         allconfigs[config].add((option, value))
 
 # Split out common config options
-if len(allconfigs) > 1:
-    common = set.intersection(*allconfigs.values())
-else:
-    common = allconfigs.values()[0].copy()
+common = allconfigs.values()[0].copy()
+for config in allconfigs.keys():
+    common &= allconfigs[config]
 for config in allconfigs.keys():
     allconfigs[config] -= common
 allconfigs["config.common"] = common