From a26a2841ff2d69590575a66e7661a89c18b5d0bd Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 16 Oct 2017 10:43:22 -0400 Subject: [PATCH] fix closure issues fixes #31786 --- lib/ansible/module_utils/basic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 4d304266cc..4b140c1a01 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -2538,6 +2538,7 @@ class AnsibleModule(object): # sadly there are some situations where we cannot ensure atomicity, but only if # the user insists and we get the appropriate error we update the file unsafely try: + out_dest = in_src = None try: out_dest = open(dest, 'wb') in_src = open(src, 'rb')