forked from expo/troggle
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:
parent
e2c6845ae0
commit
6060ae1c08
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user