-
Notifications
You must be signed in to change notification settings - Fork 3
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
Non required parameters cause exception if missing #5
Comments
Yes, thanks. Looks fine |
No, sorry. This will not correctly handle this. It will then not handle and check non-required parameters for the type of the parameter |
Apologies, yes you're right. How is this instead?
|
This is not checking the required flag |
I think my first suggestion for a fix might have confused the issue. This function was never checking for required attributes. A quick search through the file shows that required parameters are checked elsewhere. My first suggestion was a bit brain dead, and used the required flag since those parameters were guaranteed to exist, so would not cause an exception. As you pointed out, that doesn't work if you need to parse non required parameters. It was a bit like fixing a squeaky wheel by removing the wheel. The original and real issue of crashing on unpopulated environment variables is fixed by continuing the loop if they don't exist. |
Please test this and provide a proper pull request |
It seems that non required parameters are actually required, since the agent will throw an exception if they are missing.
Adding a filter to parse_parameters fixes it for me:
The text was updated successfully, but these errors were encountered: