From cdd14b137d9b93d799aec4355270dcf3b5586a3d Mon Sep 17 00:00:00 2001 From: Al Date: Sat, 21 May 2016 19:17:11 -0400 Subject: [PATCH] [fix] set union will usually be over 0 subsets --- scripts/geodata/places/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/geodata/places/config.py b/scripts/geodata/places/config.py index 906a1777..f040365a 100644 --- a/scripts/geodata/places/config.py +++ b/scripts/geodata/places/config.py @@ -84,7 +84,10 @@ class PlaceConfig(object): for c in admin_components: names[components[c]].append(c) - same_name = set.union(*[set(v) for c, v in six.iteritems(names) if len(v) > 1]) + same_name = set() + for c, v in six.iteritems(names): + if len(v) > 1: + same_name |= set(v) new_components = components.copy()