mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user