Misc Python 3 changes: execfile(), file(), reduce(), StandardError

This commit is contained in:
cclauss
2018-02-09 17:17:05 +01:00
parent 476dbe58c5
commit 260aec543e
6 changed files with 8 additions and 4 deletions

View File

@@ -322,4 +322,5 @@ if __name__ == '__main__':
imp.load_source('ansible.cli.inventory', __file__ + '.py', f)
ansible_path = distutils.spawn.find_executable('ansible')
sys.argv[0] = 'ansible-inventory'
execfile(ansible_path)
with open(ansible_path) as in_file:
exec(in_file.read())