| # report any duplicate list names as errors |
| iflen(duplicate_list_names) >0: |
| print("Found "+str(len(duplicate_list_names)) +" DUPLICATE_LIST_NAME cases.") |
| num_found=0 |
| forhinhighway_systems: |
| forrinh.route_list: |
| ifr.region+' '+r.list_entry_name() induplicate_list_names: |
| el.add_error("Duplicate list name: "+r.region+' '+r.list_entry_name()) |
| num_found+=1 |
| print("Added "+str(num_found) +" DUPLICATE_LIST_NAME error entries.") |
| else: |
| print("No duplicate list names found.") |
-># report any duplicate list names as errorsiflen(duplicate_list_names) >0:
fordinduplicate_list_names:
el.add_error("Duplicate list name: "+d)
print("Added "+str(len(duplicate_list_names)) +" DUPLICATE_LIST_NAME error entries.")
else:
print("No duplicate list names found.")...would just add the duplicate list names straight to the ErrorList, without having to iterate thru highway_systems & their route_lists, or duplicate_list_names.
Rather than report duplicate .list names for every Route containing them, they're just reported once each.
Any reason not to do this?
DataProcessing/siteupdate/python-teresco/siteupdate.py
Lines 2058 to 2069 in b8af793
->
...would just add the duplicate list names straight to the ErrorList, without having to iterate thru
highway_systems& theirroute_lists, orduplicate_list_names.Rather than report duplicate .list names for every Route containing them, they're just reported once each.
Any reason not to do this?