summaryrefslogtreecommitdiffstats
path: root/parsers/survex.py
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:20:08 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:20:08 +0100
commita21b61e2b6a00ddf400d1092249140f479aad2c4 (patch)
tree67957e14b317060210d82660950fb4a338ee671b /parsers/survex.py
parent0b9afdd0e7cf784a830604e35ca79c0999169512 (diff)
downloadtroggle-a21b61e2b6a00ddf400d1092249140f479aad2c4.tar.gz
troggle-a21b61e2b6a00ddf400d1092249140f479aad2c4.tar.bz2
troggle-a21b61e2b6a00ddf400d1092249140f479aad2c4.zip
[svn] convert unfound files to lower case and try again
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8071 by julian @ 11/7/2008 8:55 AM
Diffstat (limited to 'parsers/survex.py')
-rw-r--r--parsers/survex.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/parsers/survex.py b/parsers/survex.py
index a3ea4dc..ccc4ed6 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -11,7 +11,10 @@ re_date = re.compile(r"^\s*\*date\s+(.*?)\s*$", re.IGNORECASE)
def fileIterator(directory, filename):
survex_file = os.path.join(directory, filename + ".svx")
- f = open(os.path.join(settings.SURVEX_DATA, survex_file), "rb")
+ try:
+ f = open(os.path.join(settings.SURVEX_DATA, survex_file), "rb")
+ except:
+ f = open(os.path.join(settings.SURVEX_DATA, survex_file).lower(), "rb")
char = 0
for line in f.readlines():
line = unicode(line, "latin1")
@@ -50,7 +53,7 @@ def make_model(name, parent, iter_lines, sf, c, l):
assert (end.groups()[0]).lower() == (name).lower()
return None
elif date:
- print date.groups()[0]
+ #print date.groups()[0]
m.text = m.text + line
else:
m.text = m.text + line