summaryrefslogtreecommitdiffstats
path: root/parsers/survex.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-10-06 12:51:43 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-10-06 12:51:43 +0300
commit8d08a67302c88c00e42959cdabcc73ec3f478dd0 (patch)
treefd651c1a03d4c33981588724bd96bbd9e7f9bc1e /parsers/survex.py
parent29c5c82337bd249dffcc40e631a181c0af4a79f6 (diff)
downloadtroggle-8d08a67302c88c00e42959cdabcc73ec3f478dd0.tar.gz
troggle-8d08a67302c88c00e42959cdabcc73ec3f478dd0.tar.bz2
troggle-8d08a67302c88c00e42959cdabcc73ec3f478dd0.zip
strip spaces in pending caves list
Diffstat (limited to 'parsers/survex.py')
-rw-r--r--parsers/survex.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/parsers/survex.py b/parsers/survex.py
index d2fdd8b..3789cb7 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -781,7 +781,7 @@ class LoadingSurvex():
with open(fpending, "r") as fo:
cids = fo.readlines()
for cid in cids:
- id = cid.rstrip('\n').upper()
+ id = cid.strip().rstrip('\n').upper()
if cid.startswith("162"):
self.pending.add(id)
else:
@@ -808,9 +808,10 @@ class LoadingSurvex():
print(f'! ALREADY PENDING {id}',file=sys.stderr)
return
- message = f" ! Warning: cave identifier '{caveid}' (guessed from file path) is not a known cave. Need to add to expoweb/cave_data/pending.txt ? In '{includelabel}.svx' at depth:[{len(depth)}]."
+ message = f" ! Warning: cave identifier '{caveid}'or {id} (guessed from file path) is not a known cave. Need to add to expoweb/cave_data/pending.txt ? In '{includelabel}.svx' at depth:[{len(depth)}]."
print("\n"+message)
print("\n"+message,file=sys.stderr)
+ print(f"{self.pending}",end="", file=sys.stderr)
DataIssue.objects.create(parser='survex', message=message, url=get_offending_filename(includelabel))
# print(f' # datastack in LoadSurvexFile:{includelabel}', file=sys.stderr)
# for dict in self.datastack:
@@ -1591,9 +1592,9 @@ def FindAndLoadSurvex(survexblockroot):
flinear.close()
fcollate.close()
- print("\n - {:,} runs of survex 'cavern' refreshing .3d files in the unseen list \n".format(omit_scan.caverncount),file=sys.stderr)
+ print("\n - {:,} runs of survex 'cavern' refreshing .3d files in the unseen list".format(omit_scan.caverncount),file=sys.stderr)
- print("\n - {:,} survex files in linear include list including previously unseen ones \n".format(len(omit_scan.svxfileslist)),file=sys.stderr)
+ print(" - {:,} survex files in linear include list including previously unseen ones \n".format(len(omit_scan.svxfileslist)),file=sys.stderr)
omit_scan = None # Hmm. Does this actually delete all the instance variables if they are lists, dicts etc.?
mem1 = get_process_memory()