2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-22 07:11:52 +00:00

bug in pending caves parsing

This commit is contained in:
Philip Sargent 2023-10-16 13:35:36 +03:00
parent d88ae2f78c
commit 6b94829315

View File

@ -847,9 +847,11 @@ def readcaves():
with open(fpending, "r") as fo:
cids = fo.readlines()
for cid in cids:
pcaveid = cid.strip().rstrip("\n")
if pcaveid !="":
pending.add(pcaveid)
pcaveid = cid.split(";", 1)[0] # split on ";" and take the first bit
pcaveid = pcaveid.strip().rstrip("\n")
if pcaveid =="":
continue
pending.add(pcaveid)
with transaction.atomic():
print(" - Deleting Caves and Entrances")