When trying to reuse the doit module in a standalone script that doesn't behave exactly like a dodo.py
would, it's impossible to reuse doit.loader.load_doit_config()
passing sys.modules[__name__]
(the current "main" module), because it relies on the module object having a get
method. That's not the case for the main module, it appears.
So for line 211 in the current version of loader.py
I would suggest to replace:
doit_config = dodo_module.get('DOIT_CONFIG', {})
.... by:
doit_config = getattr(dodo_module, 'DOIT_CONFIG', {})
Environment
Thanks,
Oliver
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too