whitespace cleanup

This commit is contained in:
olly 2015-06-20 10:51:19 +12:00
parent 293441a503
commit 05b55391d6

View File

@ -56,7 +56,7 @@ def exists_in_path(cmd):
extensions = os.environ.get("PATHEXT", "").split(os.pathsep) extensions = os.environ.get("PATHEXT", "").split(os.pathsep)
for directory in os.environ.get("PATH", "").split(os.pathsep): for directory in os.environ.get("PATH", "").split(os.pathsep):
base = os.path.join(directory, cmd) base = os.path.join(directory, cmd)
options = [base] + [(base + ext) for ext in extensions] options = [base] + [(base + ext) for ext in extensions]
for filename in options: for filename in options:
if os.path.exists(filename): if os.path.exists(filename):
@ -95,7 +95,7 @@ def is_explored(cave):
s = s.replace("(?)","") s = s.replace("(?)","")
if s[-1] == " ": s=s[:-1] if s[-1] == " ": s=s[:-1]
if (not s): if (not s):
print "Rogue space in " + find_effective_number(cave) print "Rogue space in " + find_effective_number(cave)
return "<td></td>" return "<td></td>"
code = s[-1] code = s[-1]
if code == '+': status = "good" if code == '+': status = "good"
@ -186,8 +186,8 @@ def get_img_name(maparea):
# big map first (zoom factor ignored) # big map first (zoom factor ignored)
maps = { maps = {
# id left top right bottom zoom # id left top right bottom zoom description
# G&K G&K G&K G&K factor # G&K G&K G&K G&K factor
# DO NOT just change the coordinates of "all" - they MUST match the borders of the scanned map. # DO NOT just change the coordinates of "all" - they MUST match the borders of the scanned map.
"all": [34394.9, 84508.6, 37399.4, 80895.6, 1.0, "All"], "all": [34394.9, 84508.6, 37399.4, 80895.6, 1.0, "All"],
"40": [36275.6, 82392.5, 36780.3, 81800.0, 3.0, "Eish&ouml;hle"], "40": [36275.6, 82392.5, 36780.3, 81800.0, 3.0, "Eish&ouml;hle"],
@ -392,7 +392,7 @@ cavestoplot = []
for cave in cavetab: for cave in cavetab:
if cave["Link file"]: continue if cave["Link file"]: continue
number = find_effective_number(cave) number = find_effective_number(cave)
if(cave["Multiple entrances"] not in ["", "yes"]): if cave["Multiple entrances"] not in ["", "yes"]):
number = "&mdash;" + cachednumber + cave["Entrances"] number = "&mdash;" + cachednumber + cave["Entrances"]
shortnumber = cachednumber shortnumber = cachednumber
if not cave["Area"]: cave["Area"] = cachedarea if not cave["Area"]: cave["Area"] = cachedarea
@ -404,7 +404,7 @@ for cave in cavetab:
cachedarea = cave["Area"] cachedarea = cave["Area"]
area = cave["Area"] area = cave["Area"]
# We have some areas like '2b or 4 (unclear)' - just chop the space # We have some areas like '2b or 4 (unclear)' - just chop the space
# and everything after it for these. # and everything after it for these.
area = re.sub(r' .*', "", area) area = re.sub(r' .*', "", area)
if area == '1626' or area == 'nonexistent': continue if area == '1626' or area == 'nonexistent': continue
@ -414,7 +414,7 @@ for cave in cavetab:
except: except:
print "Unable to find location for %s" % (number) print "Unable to find location for %s" % (number)
else: else:
label = find_label(cave, shortnumber) label = find_label(cave, shortnumber)
if(cave["Multiple entrances"] == "yes"): if(cave["Multiple entrances"] == "yes"):
locn = "<td colspan=\"3\">&nbsp;</td>" locn = "<td colspan=\"3\">&nbsp;</td>"
elif(loctuple): elif(loctuple):