Add debug for which entrance file was being read so we get a clue where to look when 'databasereset newcaves' falls over

This commit is contained in:
wookey 2012-09-24 22:38:35 +01:00
parent 6060ae1c08
commit 631ac20c12

View File

@ -11,6 +11,7 @@ def readcaves():
newArea = models.Area(short_name = "1626", parent = None) newArea = models.Area(short_name = "1626", parent = None)
newArea.save() newArea.save()
print "Entrances" print "Entrances"
print "list of <Slug> <Filename>"
for filename in os.walk(settings.ENTRANCEDESCRIPTIONS).next()[2]: #Should be a better way of getting a list of files for filename in os.walk(settings.ENTRANCEDESCRIPTIONS).next()[2]: #Should be a better way of getting a list of files
readentrance(filename) readentrance(filename)
print "Caves" print "Caves"
@ -74,7 +75,6 @@ def readentrance(filename):
cached_primary_slug = slugs[0]) cached_primary_slug = slugs[0])
e.save() e.save()
primary = True primary = True
print "list of <Slug> <Filename>"
for slug in slugs: for slug in slugs:
print slug, filename print slug, filename
cs = models.EntranceSlug(entrance = e, cs = models.EntranceSlug(entrance = e,