aegea
aegea copied to clipboard
Initialize on-demand and don't fail on read-only FS
Currently, the following works:
import aegea
aegea.initialize()
from aegea.batch import submit, submit_parser
submit(submit_parser.parse_args([...]))
While the following does not:
import aegea
from aegea.batch import submit, submit_parser
aegea.initialize()
submit(submit_parser.parse_args([...]))
This is because the global aegea.config object is rebound at runtime in the init sequence.
Replace the global object with an auto-vivifying placeholder.
Also, init fails on read-only FS. Fall back and print a warning instead of failing.