From adcb87f781f8f1e9efebb8aa757d42a6370b7589 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 30 Aug 2016 19:47:41 +0200 Subject: [PATCH] file() function in python3 no longer exist, so use open() (#17303) --- lib/ansible/plugins/action/assemble.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/action/assemble.py b/lib/ansible/plugins/action/assemble.py index 13a02a88555..d40067aac79 100644 --- a/lib/ansible/plugins/action/assemble.py +++ b/lib/ansible/plugins/action/assemble.py @@ -49,7 +49,7 @@ class ActionModule(ActionBase): if not os.path.isfile(fragment) or (ignore_hidden and os.path.basename(fragment).startswith('.')): continue - fragment_content = file(self._loader.get_real_file(fragment)).read() + fragment_content = open(self._loader.get_real_file(fragment)).read() # always put a newline between fragments if the previous fragment didn't end with a newline. if add_newline: