diff options
author | Wookey <wookey@wookware.org> | 2013-07-02 20:23:55 +0100 |
---|---|---|
committer | Wookey <wookey@wookware.org> | 2013-07-02 20:23:55 +0100 |
commit | ecfa6b19a0f04a2877d6e9294651e14fda70a0da (patch) | |
tree | d51ed4540a3fe0d817ae74890890bbdeb6c09330 /core | |
parent | 0dfbd1c84f13ee18451f739987f918cb5ac620ab (diff) | |
parent | 1471abeda79002a69f325f45625ec9feb6be06f2 (diff) | |
download | troggle-ecfa6b19a0f04a2877d6e9294651e14fda70a0da.tar.gz troggle-ecfa6b19a0f04a2877d6e9294651e14fda70a0da.tar.bz2 troggle-ecfa6b19a0f04a2877d6e9294651e14fda70a0da.zip |
merged in proper CSRF changes from server
Diffstat (limited to 'core')
-rw-r--r-- | core/views_survex.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/core/views_survex.py b/core/views_survex.py index 852dd25..cf3b556 100644 --- a/core/views_survex.py +++ b/core/views_survex.py @@ -213,11 +213,6 @@ def err(request, survex_file): def identifycavedircontents(gcavedir): # find the primary survex file in each cave directory - # name is the directory, nf is the base name of the file we are currently trying - # primesvx is the 'controlling' .svx for this dir. This code currently wrongly assumes that every dir has one - # The in-scan exceptions are a bad idea. - # subsvx is all the svx files in this dir, with 'primesvx' listed first - # subdirs is sibdirs of the current dir. name = os.path.split(gcavedir)[1] subdirs = [ ] subsvx = [ ] @@ -236,7 +231,7 @@ def identifycavedircontents(gcavedir): elif f[-4:] == ".svx": nf = f[:-4] - if nf.lower() == name.lower() or nf[:3] == "all" or (name, nf) in [("resurvey2005", "145-2005"),("cucc","142"),("cucc","cu115")]: + if nf.lower() == name.lower() or nf[:3] == "all" or (name, nf) in [("resurvey2005", "145-2005"), ("cucc", "cu115")]: if primesvx: if nf[:3] == "all": assert primesvx[:3] != "all", (name, nf, primesvx, gcavedir, subsvx) @@ -247,14 +242,9 @@ def identifycavedircontents(gcavedir): primesvx = nf else: subsvx.append(nf) - #else: - # This assert means that having a .ods file in the dir is fatal - that's not a good thing - # so commented out [W] - #assert re.match(".*?(?:.3d|.log|.err|.txt|.tmp|.diff|.e?spec|~)$", f), (gcavedir, f) + else: + assert re.match(".*?(?:.3d|.log|.err|.txt|.tmp|.diff|.e?spec|~)$", f), (gcavedir, f) subsvx.sort() - #If this code fails then _no_ survey files are vieable. - #This assert means that any wierd file someone checks in to the dataset can make _everything_ unveiwable. - #If we don't grok it then just skip it.? #assert primesvx, (gcavedir, subsvx) if primesvx: subsvx.insert(0, primesvx) |