[PR #5933/b1d9507c backport][stable-6] Fix pylint errors (#5937)

Fix pylint errors (#5933)

* Fix pylint errors.

* Also adjust to https://github.com/ansible/ansible/pull/79909.

(cherry picked from commit b1d9507cd2)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2023-02-04 17:22:05 +01:00 committed by GitHub
parent ead9524dc3
commit d8cf32e6c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 9 deletions

View file

@ -628,9 +628,9 @@ def main():
outputs_command = [command[0], 'output', '-no-color', '-json'] + _state_args(state_file)
rc, outputs_text, outputs_err = module.run_command(outputs_command, cwd=project_path)
outputs = {}
if rc == 1:
module.warn("Could not get Terraform outputs. This usually means none have been defined.\nstdout: {0}\nstderr: {1}".format(outputs_text, outputs_err))
outputs = {}
elif rc != 0:
module.fail_json(
msg="Failure when getting Terraform outputs. "