Commit f5d49351 by Marius Gedminas

Python 3: treat python as a function in module_utils/basic.py

NB: we can't use 'from __future__ import print_function', but luckily
print(one_thing) works fine on both Python 2 and Python 3 without that.
parent e71a986e
......@@ -1354,7 +1354,7 @@ class AnsibleModule(object):
if not 'changed' in kwargs:
kwargs['changed'] = False
self.do_cleanup_files()
print self.jsonify(kwargs)
print(self.jsonify(kwargs))
sys.exit(0)
def fail_json(self, **kwargs):
......@@ -1363,7 +1363,7 @@ class AnsibleModule(object):
assert 'msg' in kwargs, "implementation error -- msg to explain the error is required"
kwargs['failed'] = True
self.do_cleanup_files()
print self.jsonify(kwargs)
print(self.jsonify(kwargs))
sys.exit(1)
def is_executable(self, path):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment