Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kislyuk opened this issue Feb 23, 2021 · 0 comments
Open

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

kislyuk opened this issue Feb 23, 2021 · 0 comments

Comments

@kislyuk
Copy link
Owner

kislyuk commented Feb 23, 2021

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 kislyuk changed the title Initialize on-demand Initialize on-demand and don't fail on read-only FS Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant