summaryrefslogtreecommitdiffstats
path: root/parsers/subcaves.py
diff options
context:
space:
mode:
authorSam Wenham <sam@wenhams.co.uk>2020-02-24 15:04:07 +0000
committerSam Wenham <sam@wenhams.co.uk>2020-02-24 15:04:07 +0000
commit43dfe946b6385037141b94b775112037fe5f032f (patch)
tree72c352e67166f0702ab93d7063c902ff1bd2c621 /parsers/subcaves.py
parent656ddcfe93061f2f82160ff8cc45b98d27e28bd3 (diff)
downloadtroggle-43dfe946b6385037141b94b775112037fe5f032f.tar.gz
troggle-43dfe946b6385037141b94b775112037fe5f032f.tar.bz2
troggle-43dfe946b6385037141b94b775112037fe5f032f.zip
Just removing dud whitespacedjango-1.10
Diffstat (limited to 'parsers/subcaves.py')
-rw-r--r--parsers/subcaves.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/parsers/subcaves.py b/parsers/subcaves.py
index 739af44..364da0d 100644
--- a/parsers/subcaves.py
+++ b/parsers/subcaves.py
@@ -1,5 +1,7 @@
'''
-This module is the part of troggle that parses descriptions of cave parts (subcaves) from the legacy html files and saves them in the troggle database as instances of the model Subcave. Unfortunately, this parser can not be very flexible because the legacy format is poorly structured.
+This module is the part of troggle that parses descriptions of cave parts (subcaves) from the legacy html
+files and saves them in the troggle database as instances of the model Subcave.
+Unfortunately, this parser can not be very flexible because the legacy format is poorly structured.
'''
import sys, os
@@ -29,12 +31,12 @@ def importSubcaves(cave):
link[0])
subcaveFile=open(subcaveFilePath,'r')
description=subcaveFile.read().decode('iso-8859-1').encode('utf-8')
-
+
lookupAttribs={'title':link[1], 'cave':cave}
nonLookupAttribs={'description':description}
newSubcave=save_carefully(Subcave,lookupAttribs=lookupAttribs,nonLookupAttribs=nonLookupAttribs)
- logging.info("Added " + unicode(newSubcave) + " to " + unicode(cave))
+ logging.info("Added " + unicode(newSubcave) + " to " + unicode(cave))
except IOError:
logging.info("Subcave import couldn't open "+subcaveFilePath)