fixes #31786
(cherry picked from commit a26a2841ff2d69590575a66e7661a89c18b5d0bd)
... | ... |
@@ -2533,6 +2533,7 @@ class AnsibleModule(object): |
2533 | 2533 |
# sadly there are some situations where we cannot ensure atomicity, but only if |
2534 | 2534 |
# the user insists and we get the appropriate error we update the file unsafely |
2535 | 2535 |
try: |
2536 |
+ out_dest = in_src = None |
|
2536 | 2537 |
try: |
2537 | 2538 |
out_dest = open(dest, 'wb') |
2538 | 2539 |
in_src = open(src, 'rb') |