aegea icon indicating copy to clipboard operation
aegea copied to clipboard

Initialize on-demand and don't fail on read-only FS

Open kislyuk opened this issue 5 years ago • 0 comments

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.

kislyuk avatar Feb 23 '21 22:02 kislyuk