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

file() function in python3 no longer exist, so use open() (#17303)

This commit is contained in:
Michael Scherer 2016-08-30 19:47:41 +02:00 committed by Toshio Kuratomi
parent 9245c786db
commit adcb87f781

View file

@ -49,7 +49,7 @@ class ActionModule(ActionBase):
if not os.path.isfile(fragment) or (ignore_hidden and os.path.basename(fragment).startswith('.')): if not os.path.isfile(fragment) or (ignore_hidden and os.path.basename(fragment).startswith('.')):
continue 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. # always put a newline between fragments if the previous fragment didn't end with a newline.
if add_newline: if add_newline: