LLNL / merlin

Machine Learning for HPC Workflows
MIT License
122 stars 26 forks source link

subprocess in check_for_scheduler can also raise PermissionError #435

Closed cfriedland5 closed 1 year ago

cfriedland5 commented 1 year ago

In get_batch_type when checking for pbs check_for_scheduler raised an uncaught exception because the subprocess raised a PermissionError rather than a FileNotFoundError.

The different exception was caused by me uncritically using a .bashrc file that added directories I didn't have permissions for to my path, but for Merlin's purposes I think it makes sense to proceed with checking for the existence of the other schedulers.

I'm know I'm not following the issue template but I think there's enough info to understand what's going on. Please let me know if you need more.

bgunnar5 commented 1 year ago

This was brought to my attention by another user previously too. I'll make sure to add a fix for it soon. I think it should be sufficient to just add another exception catcher for the PermissionError but I'll have to look into it a bit more before making a final decision.