forked from expo/troggle
Make sure that cave parser only reads .html files in cave_data dir (to stop foo~ causing 'duplicate cave' error)
This commit is contained in:
parent
01f17dc1cc
commit
b4d3cb514c
@ -14,10 +14,11 @@ def readcaves():
|
||||
#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
|
||||
if filename.endswith('.html'):
|
||||
readentrance(filename)
|
||||
readentrance(filename)
|
||||
print "Reading Caves"
|
||||
for filename in os.walk(settings.CAVEDESCRIPTIONS).next()[2]: #Should be a better way of getting a list of files
|
||||
readcave(filename)
|
||||
if filename.endswith('.html'):
|
||||
readcave(filename)
|
||||
|
||||
def readentrance(filename):
|
||||
with open(os.path.join(settings.ENTRANCEDESCRIPTIONS, filename)) as f:
|
||||
|
Loading…
Reference in New Issue
Block a user