]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/cron_banip.py
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / utils / cron_banip.py
index 17268bc15a48f0d49b90108442a6d9eca9c0b9ea..c8fdd78c9aea124a305559e6b748ed121c0b96d2 100755 (executable)
@@ -168,15 +168,16 @@ for ip in prevblocks:
         deblockcandidates.add(ip)    
         
 for ip in prevbulks:
-    if ip in bulkips:
-        if bulkips[ip] > BLOCK_LIMIT:
-            newblocks.add(ip)
-            newlyblocked.append(ip)
+    if ip not in newblocks:
+        if ip in bulkips:
+            if bulkips[ip] > BLOCK_LIMIT:
+                newblocks.add(ip)
+                newlyblocked.append(ip)
+            else:
+                newbulks.add(ip)
+            del bulkips[ip]
         else:
-            newbulks.add(ip)
-        del bulkips[ip]
-    else:
-        debulkcandidates.add(ip)
+            debulkcandidates.add(ip)
 
 # cross-check deblock candidates
 if deblockcandidates: