Add some debug to cave parser as it's easy to make it fail

e.g. by referring to slugs that don't exist.
This commit is contained in:
Wookey 2012-09-24 22:29:18 +01:00
parent 54d7f1d097
commit 3b12e6d975

View File

@ -74,6 +74,7 @@ def readentrance(filename):
cached_primary_slug = slugs[0])
e.save()
primary = True
print "list of <Slug> <Filename>"
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: