Closed Jsprouse0 closed 1 month ago
Hey @Jsprouse0, while reviewing your PR, I'd suggest the following code changes:
https://github.com/suny-downstate-medical-center/netpyne/pull/823
instead of using an external check for path existence (either before function call or during exception handling), calling os.makedirs() with exist_ok seems like a simpler solution.
You can also review and apply these suggestions locally on your machine.
Changed the os.mkdir file creations in netpyne (batch, specs, and sim) to os.makedirs to create any missing directories for the designated target file creation. Also fixed the OSError handling to point towards file error and exit simulation to ensure system exit handling.