22c9428776
eval can have security consequences. It doesn't look bad here but it does introduce unnecessary complexity and would make it harder if we ever want to use static analysis to detect and prohibit eval. So we should get rid of it. Note: this could be even more efficient if we combined the checks into a single condition instead of looping but that does change the error messages a bit. For instance: - for arg in ('name', 'linode_id'): - if not eval(arg): + if not (name and linode_id): + module.fail_json(msg='name and linode_id are required for active state') |
||
---|---|---|
.. | ||
ansible |