NTNU-IndEcol / BuildME

6 stars 1 forks source link

Changed the ep version validation #56

Closed CBreton026 closed 2 years ago

CBreton026 commented 2 years ago

Based on #54 , I modified the pre.py file so that it reads the version directly from the 'Energy+.idd' file.

The new code tries to open the file, then:

I didn't try launching main.py using the new pre.py file, but the pre.py file itself (validate_ep_version) ran successfully after the fix.

nheeren commented 2 years ago

Thank you so much for this great first PR! I merged it, but will make the following little change in pre.py, line 27 in a next commit (see also comments in PR):

raise FileNotFoundError instead of print()

nheeren commented 2 years ago

Or do you see a scenario where we may want to use bin_ver = None (any time soon)?

CBreton026 commented 2 years ago

No, the raise FileNotFoundError is better!