mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
removing raising of exception at end of function
This commit is contained in:
parent
4e9acdeb8e
commit
1db4c4319e
1 changed files with 6 additions and 2 deletions
|
|
@ -128,8 +128,8 @@ def extract_retrofit_pdfs(data_folder_path):
|
|||
pdf_path = os.path.join(data_folder_path, pdf_file)
|
||||
return detect_and_parse_report(pdf_path, pdf_file)
|
||||
|
||||
# If no relevant PDF is found, raise an exception
|
||||
raise FileNotFoundError("No valid report (EPR or Summary) found in the retrofit assessment folder.")
|
||||
# If no relevant PDF is found, exit
|
||||
return None
|
||||
|
||||
|
||||
def is_energy_report(text):
|
||||
|
|
@ -199,6 +199,10 @@ def main():
|
|||
}
|
||||
extracted_data.append(summary_data)
|
||||
continue
|
||||
else:
|
||||
# Then we have an empty Retrofit Assessment folder
|
||||
continue
|
||||
|
||||
# If no retrofit folder or it was empty, check files in survey_folder
|
||||
summary_data = extract_retrofit_pdfs(survey_folder_path)
|
||||
if summary_data:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue