From b907dcc993ae5e74700cfce42788bb7214ed463e Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Mon, 15 Jul 2024 12:42:46 +0200 Subject: [PATCH] debug comment --- parsers/caves.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/parsers/caves.py b/parsers/caves.py index d2327e0..1954dbb 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -640,8 +640,10 @@ def read_cave(filename, mvf=None, cave=None): """ c = cave for e in entrances: - - eslug = getXML(e, "entranceslug", maxItems=1, context=context)[0] + eslugs = getXML(e, "entranceslug", maxItems=1, context=context) + if len(eslugs) < 1: + print(f"TYPO IN cave_data file tag contents\n contents: {e}\n {eslugs=}") + eslug = eslugs[0] # if eslug.endswith(('a','b','c','d','e','f')): # print(f"! Entrance {eslug}") # if eslug.endswith('a b'): @@ -885,8 +887,7 @@ def read_cave(filename, mvf=None, cave=None): # Thsi whole way of doing entrances can be replaced by simply knowing the entrance_data filename what the cave is. to do. entrances = getXML(cavecontents, "entrance", context=context) - do_entrances() - # print(f"- {entrances_xslug=}") + #do_entrances() if not entrances or len(entrances) < 1: # missing entrance link in cave_data/1623-* .html file set_dummy_entrance(slug[5:], slug, cave, msg="DUMMY: no entrances")