diff --git a/scripts/geodata/places/config.py b/scripts/geodata/places/config.py index 9003a931..8487b3b8 100644 --- a/scripts/geodata/places/config.py +++ b/scripts/geodata/places/config.py @@ -88,11 +88,13 @@ class PlaceConfig(object): if k not in exc: continue - res = op(exc[k], population) + res = op(population, exc[k]) if not res: support = 0 break + support += 1 + if support > 0: probability = exc.get('probability', 0.0) return random.random() < probability