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.
This commit is contained in:
parent
e71a986e16
commit
f5d4935197
1 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue