2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-26 01:01:53 +00:00

fix missing .svx as not an error

This commit is contained in:
Philip Sargent 2022-08-25 17:29:43 +03:00
parent ab184bccf3
commit 6c384492be

View File

@ -149,10 +149,12 @@ def get_complaints(complaints, waldata, svxfiles, files, wallet, wurl):
if waldata["survex file"]: if waldata["survex file"]:
if not type(waldata["survex file"])==list: # a string also is a sequence type, so do it this way if not type(waldata["survex file"])==list: # a string also is a sequence type, so do it this way
waldata["survex file"] = [waldata["survex file"]] waldata["survex file"] = [waldata["survex file"]]
for svx in waldata["survex file"]: for sx in waldata["survex file"]:
if svx !="": if sx !="":
svxfiles.append(svx) if Path(sx).suffix.lower() != ".svx":
if not (Path(settings.SURVEX_DATA) / svx).is_file(): sx = sx + ".svx"
svxfiles.append(sx)
if not (Path(settings.SURVEX_DATA) / sx).is_file():
file_complaint = f"{wallet} Incorrect survex file name in {wallet} wallet data. {svx} was not found in LOSER repo" file_complaint = f"{wallet} Incorrect survex file name in {wallet} wallet data. {svx} was not found in LOSER repo"
complaints.append(file_complaint) complaints.append(file_complaint)
message = f"! {file_complaint}" message = f"! {file_complaint}"