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)

* 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>
This commit is contained in:
Andrea Tartaglia 2022-05-08 07:45:15 +01:00 committed by GitHub
parent 720e0544f9
commit 4b0245355e
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']