hiddenSymmetries / simsopt

Simons Stellarator Optimizer Code
https://simsopt.readthedocs.io
MIT License
83 stars 43 forks source link

Added 1 FileNotFoundError exception handling to vmec.py #417

Closed daringli closed 1 month ago

daringli commented 1 month ago

Adds try-except blocks around a bare os.remove() call in vmec.py.

For some reason, the os.remove(filename) changed in this pull request gave me an unhandeled exception today. I've never seen it before and I don't know why it happened. Since the file is supposed to get deleted anyway, it seems harmless to just print a warning and move on. It is also consistent with how os.remove is used elsewhere in vmec.py.