mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 22:30:22 -07:00
Fix errors reported by pylint. (#23282)
* Fix pylint misplaced-bare-raise errors. * Fix pylint return-in-init error. * Fix pylint bad-format-character error. * Fix pylint too-many-format-args errors. * Fix pylint too-few-format-args errors. * Fix pylint truncated-format-string error.
This commit is contained in:
parent
9e1bf1c6f2
commit
48eeab8a53
15 changed files with 17 additions and 25 deletions
|
@ -135,11 +135,11 @@ def content_to_dict(module, content):
|
|||
content_dict = yaml.safe_load(content)
|
||||
|
||||
if not isinstance(content_dict, dict):
|
||||
raise
|
||||
raise Exception()
|
||||
|
||||
# Check if dict is empty and return an error if it's
|
||||
if not content_dict:
|
||||
raise
|
||||
raise Exception()
|
||||
|
||||
except:
|
||||
module.fail_json(msg="Unable to convert 'content' to a dict, please check if valid")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue