1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

change list.copy() with list[:] for py2 compat in terraform module (#4621) (#4644)

* change list.copy() with list[:] for py2 compat in terraform module

* add changelog fragment

* Update changelogs/fragments/4621-terraform-py2-compat.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 4b0245355e)

Co-authored-by: Andrea Tartaglia <andrea@braingap.uk>
This commit is contained in:
patchback[bot] 2022-05-08 09:18:29 +00:00 committed by GitHub
parent 9512a389f3
commit a925e020dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- terraform - fix list initialization to support both Python 2 and Python 3 (https://github.com/ansible-collections/community.general/issues/4531).

View file

@ -332,7 +332,7 @@ def build_plan(command, project_path, variables_args, state_file, targets, state
if plan_path is None:
f, plan_path = tempfile.mkstemp(suffix='.tfplan')
local_command = command.copy()
local_command = command[:]
plan_command = [command[0], 'plan']