Doit config validation

9 views
Skip to first unread message

Andrea Richiardi

unread,
Nov 22, 2019, 6:47:41 PM11/22/19
to python-doit
Hi there, we started to use your wonderful tool and so far so good. Thank you!

I am trying to have a global config and I need to validate it, cause we have the following task creator:

def task_new_workspace():
    """Create Terraform workspace (if necessary)."""

    namespace_tag = config["namespace"]
    return ...
}

This is unfortunately throwing if namespace was not passed to the cmd line...in every single command, like doit list.
It is not ideal so I wonder whether there is a better mechanism to fetch config data?
I am too newbie so I might be doing something wrong.

Reply all
Reply to author
Forward
0 new messages