Changeset 644 for trunk


Ignore:
Timestamp:
Aug 25, 2008, 10:50:28 AM (11 years ago)
Author:
sheldon
Message:

With --no-confirm, don't delete more than 100 postcodes, same as we don't add more than 100

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/scripts/freethepostcode.org-importer/importer.py

    r635 r644  
    204204else:
    205205        # Don't trash everything even with --no-confirm
    206         if len(postcodes) == 0 or (len(postcodes)-count) > 100:
     206        if len(postcodes) == 0 or abs(len(postcodes)-count) > 100:
    207207                raise Exception("Postcode count too different, not running (re-run without --no-confirm to allow")
    208208
Note: See TracChangeset for help on using the changeset viewer.