From 3f450054f96301096d718889f45c2f1226b57f17 Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 31 Jul 2016 03:15:43 -0400 Subject: [PATCH] [fix] numeric conditions in place config --- scripts/geodata/places/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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