summaryrefslogtreecommitdiffstats
path: root/parsers/surveys.py
diff options
context:
space:
mode:
authorexpo <expo@seagrass.goatchurch.org.uk>2009-08-29 18:08:55 +0100
committerexpo <expo@seagrass.goatchurch.org.uk>2009-08-29 18:08:55 +0100
commit29adaa03c6809169411b5f2cc8a11a3b5c25d1f2 (patch)
treee6398a1efe531633a3a954d8cab3254c375c204b /parsers/surveys.py
parent9f169fb2b9f7338863b6b5fabc50e549e2ff96de (diff)
downloadtroggle-29adaa03c6809169411b5f2cc8a11a3b5c25d1f2.tar.gz
troggle-29adaa03c6809169411b5f2cc8a11a3b5c25d1f2.tar.bz2
troggle-29adaa03c6809169411b5f2cc8a11a3b5c25d1f2.zip
get rid of photo
Diffstat (limited to 'parsers/surveys.py')
-rw-r--r--parsers/surveys.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/parsers/surveys.py b/parsers/surveys.py
index fc7fb7f..ff78355 100644
--- a/parsers/surveys.py
+++ b/parsers/surveys.py
@@ -25,11 +25,11 @@ def get_or_create_placeholder(year):
return placeholder_logbook_entry
def readSurveysFromCSV():
- try:
- surveytab = open(os.path.join(settings.SURVEYS, "Surveys.csv"))
+ try: # could probably combine these two
+ surveytab = open(os.path.join(settings.SURVEY_SCANS, "Surveys.csv"))
except IOError:
- import cStringIO, urllib
- surveytab = cStringIO.StringIO(urllib.urlopen(settings.SURVEYS + "download/Surveys.csv").read())
+ import cStringIO, urllib
+ surveytab = cStringIO.StringIO(urllib.urlopen(settings.SURVEY_SCANS + "/Surveys.csv").read())
dialect=csv.Sniffer().sniff(surveytab.read())
surveytab.seek(0,0)
surveyreader = csv.reader(surveytab,dialect=dialect)
@@ -87,7 +87,7 @@ def listdir(*directories):
# add survey scans
def parseSurveyScans(year, logfile=None):
# yearFileList = listdir(year.year)
- yearPath=os.path.join(settings.SURVEY_SCANS, year.year)
+ yearPath=os.path.join(settings.SURVEY_SCANS, "years", year.year)
yearFileList=os.listdir(yearPath)
print yearFileList
for surveyFolder in yearFileList:
@@ -145,4 +145,4 @@ def isInterlacedPNG(filePath): #We need to check for interlaced PNGs because the
if 'interlace' in file.info:
return file.info['interlace']
else:
- return False \ No newline at end of file
+ return False