修复多处的Result结果未return的问题

This commit is contained in:
2025-06-03 23:23:26 +08:00
parent 454d068626
commit 7197994019
7 changed files with 44 additions and 35 deletions

View File

@ -1338,7 +1338,7 @@ class Data:
def resample(self):
if self.orgBcg is None:
Result().failure(info=Constants.RESAMPLE_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"])
return Result().failure(info=Constants.RESAMPLE_FAILURE + Constants.FAILURE_REASON["Data_Not_Exist"])
try:
if Config["InputConfig"]["orgBcgFreq"] != Config["InputConfig"]["UseFreq"]:
@ -1348,8 +1348,8 @@ class Data:
else:
return Result().success(info=Constants.RESAMPLE_NO_NEED)
except Exception as e:
Result().failure(info=Constants.RESAMPLE_FAILURE +
Constants.FAILURE_REASON["Resample_Exception"] + "\n" + format_exc())
return Result().failure(info=Constants.RESAMPLE_FAILURE +
Constants.FAILURE_REASON["Resample_Exception"] + "\n" + format_exc())
return Result().success(info=Constants.RESAMPLE_FINISHED)