From 3b12e6d9757f83b5f89c726af9197efea0741e76 Mon Sep 17 00:00:00 2001 From: Wookey Date: Mon, 24 Sep 2012 22:29:18 +0100 Subject: [PATCH] Add some debug to cave parser as it's easy to make it fail e.g. by referring to slugs that don't exist. --- parsers/caves.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parsers/caves.py b/parsers/caves.py index d92483d..305ee6c 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -74,6 +74,7 @@ def readentrance(filename): cached_primary_slug = slugs[0]) e.save() primary = True + print "list of " for slug in slugs: print slug, filename cs = models.EntranceSlug(entrance = e, @@ -86,6 +87,7 @@ def readcave(filename): with open(os.path.join(settings.CAVEDESCRIPTIONS, filename)) as f: contents = f.read() context = " in file %s" % filename + print "Reading file %s" % filename cavecontentslist = getXML(contents, "cave", maxItems = 1, context = context) #print cavecontentslist if len(cavecontentslist) == 1: