diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2024-07-15 12:42:46 +0200 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2024-07-15 12:42:46 +0200 |
commit | b907dcc993ae5e74700cfce42788bb7214ed463e (patch) | |
tree | 83728ba4a5964b1be864f0d87a513ce1d61f52ba | |
parent | 2cb665e141e617abe96dec5d038e6a355fbe01a9 (diff) | |
download | troggle-b907dcc993ae5e74700cfce42788bb7214ed463e.tar.gz troggle-b907dcc993ae5e74700cfce42788bb7214ed463e.tar.bz2 troggle-b907dcc993ae5e74700cfce42788bb7214ed463e.zip |
debug comment
-rw-r--r-- | parsers/caves.py | 9 |
1 files 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 <entrance> tag contents\n <entrance> 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") |