forked from expo/troggle
clean up after Mark changed things a bit
This commit is contained in:
parent
3bd7684d4b
commit
c31615b1ff
@ -435,7 +435,7 @@ class LoadingSurvex:
|
||||
self.currentdate = self.inheritdate # unecessary duplication
|
||||
# Not an error, so not put in DataIssues, but is printed to debug output
|
||||
message = (
|
||||
f"- No *date. INHERITING date from ({survexblock.parent})-{survexblock.parent.survexfile.path} to ({survexblock})-{survexblock.survexfile.path} {self.inheritdate:%Y-%m-%d}"
|
||||
f"- No *date. INHERITING date '{self.inheritdate:%Y-%m-%d}' from ({survexblock.parent})-{survexblock.parent.survexfile.path} to ({survexblock})-{survexblock.survexfile.path} {self.inheritdate:%Y-%m-%d}"
|
||||
)
|
||||
print(self.insp + message)
|
||||
# stash_data_issue(
|
||||
@ -443,14 +443,25 @@ class LoadingSurvex:
|
||||
# )
|
||||
if survexblock.survexfile != survexblock.parent.survexfile:
|
||||
# This is noteworthy, however.
|
||||
|
||||
if survexblock.parent.name == "rootblock":
|
||||
# Not a sensible thing to inherit a date from, even if a date exists, which it shouldn't...
|
||||
message = (
|
||||
f"- Warning *date INHERITED from DIFFERENT file:\n ({survexblock.parent})-{survexblock.parent.survexfile.path} to ({survexblock})-{survexblock.survexfile.path} {self.inheritdate:%Y-%m-%d}\n {self.stackbegin} {self.inheritdate:%Y-%m-%d}"
|
||||
f"- No *date. But not sensible to inherit from rootblock. From ({survexblock.parent})-{survexblock.parent.survexfile.path} to ({survexblock})-{survexblock.survexfile.path} {self.inheritdate:%Y-%m-%d}"
|
||||
)
|
||||
print(self.insp + message)
|
||||
# stash_data_issue(
|
||||
# parser="survex", message=message, url=None, sb=(survexblock.survexfile.path)
|
||||
# )
|
||||
return
|
||||
else:
|
||||
message = (
|
||||
f"- Warning *date '{self.inheritdate:%Y-%m-%d}' INHERITED from DIFFERENT file:\n ({survexblock.parent})-{survexblock.parent.survexfile.path} to ({survexblock})-{survexblock.survexfile.path} {self.inheritdate:%Y-%m-%d}\n {self.stackbegin} {self.inheritdate:%Y-%m-%d}"
|
||||
)
|
||||
print(self.insp + message)
|
||||
stash_data_issue(
|
||||
parser="survex", message=message, url=None, sb=(survexblock.parent.survexfile.path) # PARENT
|
||||
)
|
||||
|
||||
return self.inheritdate
|
||||
else:
|
||||
# This is not an error in the Expo dataset.
|
||||
@ -2203,7 +2214,7 @@ def FindAndLoadSurvex(survexblockroot):
|
||||
)
|
||||
check_team_cache()
|
||||
print(f" -- Now loading the previously-omitted survex files.", file=sys.stderr)
|
||||
print(f" - (except the exceptions: {excpts})", file=sys.stderr)
|
||||
print(f" - (except: {excpts})", file=sys.stderr)
|
||||
|
||||
with open(Path(settings.SURVEX_DATA, UNSEENS), "w") as u:
|
||||
u.write(
|
||||
|
Loading…
Reference in New Issue
Block a user