2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-22 07:11:52 +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 not type(waldata["survex file"])==list: # a string also is a sequence type, so do it this way
waldata["survex file"] = [waldata["survex file"]]
for svx in waldata["survex file"]:
if svx !="":
svxfiles.append(svx)
if not (Path(settings.SURVEX_DATA) / svx).is_file():
for sx in waldata["survex file"]:
if sx !="":
if Path(sx).suffix.lower() != ".svx":
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"
complaints.append(file_complaint)
message = f"! {file_complaint}"