From 0c20ef2a044e85a54c9df74b40220f105e263db5 Mon Sep 17 00:00:00 2001 From: expo Date: Sun, 5 Aug 2012 00:26:05 +0200 Subject: [PATCH] Fix up parser paths so everything is found --- flatpages/views.py | 3 ++- parsers/surveys.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flatpages/views.py b/flatpages/views.py index d805c20..0999d31 100644 --- a/flatpages/views.py +++ b/flatpages/views.py @@ -50,7 +50,8 @@ def flatpage(request, path): return render_with_context(request, 'pagenotfound.html', {'path': path}) else: try: - o = open(os.path.normpath(settings.EXPOWEB + path), "rb") + filetobeopened = os.path.normpath(settings.EXPOWEB + path) + o = open(filetobeopened, "rb") except IOError: return render_with_context(request, 'pagenotfound.html', {'path': path}) if path.endswith(".htm") or path.endswith(".html"): diff --git a/parsers/surveys.py b/parsers/surveys.py index 0c6eb4b..733cdfa 100644 --- a/parsers/surveys.py +++ b/parsers/surveys.py @@ -89,7 +89,7 @@ def listdir(*directories): # add survey scans def parseSurveyScans(year, logfile=None): # yearFileList = listdir(year.year) - yearPath=os.path.join(settings.SURVEY_SCANS, "years", year.year) + yearPath=os.path.join(settings.SURVEY_SCANS, year.year) yearFileList=os.listdir(yearPath) print yearFileList for surveyFolder in yearFileList: