summaryrefslogtreecommitdiffstats
path: root/parsers/surveys.py
diff options
context:
space:
mode:
Diffstat (limited to 'parsers/surveys.py')
-rw-r--r--parsers/surveys.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/parsers/surveys.py b/parsers/surveys.py
index ec6298c..942c0a5 100644
--- a/parsers/surveys.py
+++ b/parsers/surveys.py
@@ -82,14 +82,14 @@ def get_or_create_placeholder(year):
# logging.info("added survey " + survey[header['Year']] + "#" + surveyobj.wallet_number + "\r")
# dead
-def listdir(*directories):
- try:
- return os.listdir(os.path.join(settings.SURVEYS, *directories))
- except:
- import urllib.request, urllib.parse, urllib.error
- url = settings.SURVEYS + reduce(lambda x, y: x + "/" + y, ["listdir"] + list(directories))
- folders = urllib.request.urlopen(url.replace("#", "%23")).readlines()
- return [folder.rstrip(r"/") for folder in folders]
+# def listdir(*directories):
+ # try:
+ # return os.listdir(os.path.join(settings.SURVEYS, *directories))
+ # except:
+ # import urllib.request, urllib.parse, urllib.error
+ # url = settings.SURVEYS + reduce(lambda x, y: x + "/" + y, ["listdir"] + list(directories))
+ # folders = urllib.request.urlopen(url.replace("#", "%23")).readlines()
+ # return [folder.rstrip(r"/") for folder in folders]
# add survey scans
# def parseSurveyScans(expedition, logfile=None):
@@ -171,13 +171,13 @@ def listdir(*directories):
# parseSurveyScans(expedition)
# dead
-def isInterlacedPNG(filePath): #We need to check for interlaced PNGs because the thumbnail engine can't handle them (uses PIL)
- file=Image.open(filePath)
- print(filePath)
- if 'interlace' in file.info:
- return file.info['interlace']
- else:
- return False
+# def isInterlacedPNG(filePath): #We need to check for interlaced PNGs because the thumbnail engine can't handle them (uses PIL)
+ # file=Image.open(filePath)
+ # print(filePath)
+ # if 'interlace' in file.info:
+ # return file.info['interlace']
+ # else:
+ # return False
# handles url or file, so we can refer to a set of scans on another server