summaryrefslogtreecommitdiffstats
path: root/parsers/survex.py
diff options
context:
space:
mode:
Diffstat (limited to 'parsers/survex.py')
-rw-r--r--parsers/survex.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/parsers/survex.py b/parsers/survex.py
index d8eda23..79e90d1 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -1309,7 +1309,10 @@ class LoadingSurvex:
insp = self.insp
# create a short, hopefully-unique name for this block to be used in the QM id
- blockname = survexblock.name[:6] + survexblock.name[-1:]
+ if len(survexblock.name) < 7:
+ blockname = survexblock.name
+ else:
+ blockname = survexblock.name[:6] + survexblock.name[-1:]
# logslug = f'D{int(qmyear)}_{blockname}_{int(qm_no):03d}'
qm_ticked = False # default
@@ -1319,7 +1322,7 @@ class LoadingSurvex:
self.TickSurvexQM(survexblock, qmline)
return
- if qm_grade not in ["A", "B", "C", "D", "X", "V", "?"]:
+ if qm_grade not in ["A", "B", "C", "D", "X"]: # "V", "?" not allowed in survex file QMs
message = f" ! QM{qm_no} INVALID code '{qm_grade}' [{blockname}] '{survexblock.survexfile.path}'"
print(insp + message)
stash_data_issue(
@@ -1336,7 +1339,7 @@ class LoadingSurvex:
pass
else:
qm_ticked = True
- print(f"{survexblock.survexfile.cave} {survexblock}:{qm_no}{qm_grade} {qmline.group(4)}", file=sys.stderr)
+ # print(f"{survexblock.survexfile.cave} {survexblock}:{qm_no}{qm_grade} {qmline.group(4)}", file=sys.stderr)
if resolution_station_name:
qm_ticked = True
# if qmline.group(6) and qmline.group(6) != "-":