Open jweiher opened 4 months ago
Hi @jweiher
Thank you so much for your advice! We'll improve the code you mentioned in the next release.
Thanks, Jie
Hi @jweiher
We just released Ansible FOS 2.3.7. and improved our code according your suggestion, many thanks!
Thanks, Maxx
Hi,
instead of raising a proper Exception(), a string is thrown here https://github.com/fortinet-ansible-dev/ansible-galaxy-fortios-collection/blame/1aeb9fa6dfd24b3c9d9d8b95c29b8a6953854abe/plugins/module_utils/fortios/fortios.py#L108
addditionally, in https://github.com/fortinet-ansible-dev/ansible-galaxy-fortios-collection/blob/main/plugins/module_utils/fortios/fortios.py#L114, a BaseException is thrown which is not how Exception handling in python is done. You should not raise BaseException but Exception or (even better) custom subclass of the builtin Exception class:
Thank you, Jan