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 | 5351108ec1b2325d47f6f9b7534991c1aa518d40 (patch) | |
tree | 1beb74fb2d2d6328c90bf39aac9ddfb1e2669976 /core/views_survex.py | |
parent | f3a570a21daa84e2e0abc079ef84f813aa15969a (diff) | |
parent | 7759e481d46c60d129ab2d54f2813ecc27ec8ec6 (diff) | |
download | troggle-5351108ec1b2325d47f6f9b7534991c1aa518d40.tar.gz troggle-5351108ec1b2325d47f6f9b7534991c1aa518d40.tar.bz2 troggle-5351108ec1b2325d47f6f9b7534991c1aa518d40.zip |
merged in proper CSRF changes from server
Diffstat (limited to 'core/views_survex.py')
-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) |